squareRoot
Last updated
Last updated
Get the square root of a number.
value
The number to return the square root of.
Number
-
-
Yes
Returns the square root value.
Number
In this example, we will get the squareroot of a value and print the result in the console.
Drag a button
component into the canvas and open the Action
tab. Select the press
event of the button and drag the Log.write
function to the event flow.
Call the function Math.squareRoot
inside the Log.write
function.
Enter the value to get the squareroot of.
The console will print the value 2
.