squareRoot
Description
Get the square root of a number.
Input / Parameter
Name
Description
Input Type
Default
Options
Required
value
The number to return the square root of.
Number
-
-
Yes
Output
Description
Output Type
Returns the square root value.
Number
Example
In this example, we will get the squareroot of a value and print the result in the console.
Steps
Drag a
button
component into the canvas and open theAction
tab. Select thepress
event of the button and drag theLog.write
function to the event flow.Call the function
Math.squareRoot
inside theLog.write
function.Enter the value to get the squareroot of.
Result
The console will print the value
2
.
Last updated