Takes the square root of x.
There are some math calculations that require you to take the square root. Math.sqrt(x) does not change the value of x, rather it returns the the square root of x.
var t = Math.sqrt(16); console.log(t);
Math.sqrt(x);
Name | Type | Required? | Description |
---|---|---|---|
x | Number | A number to take the square root of |
A number that is the square root of x
Found a bug in the documentation? Let us know at documentation@code.org