The mathSqrt() function returns the square root of a number.
mathSqrt()
0.12.0
A number
The square root of x, a positive number. If x is negative, NaN is returned.
mathSqrt(9); // 3mathSqrt(2); // 1.414...mathSqrt(1); // 1mathSqrt(0); // 0mathSqrt(-1); // NaN Copy
mathSqrt(9); // 3mathSqrt(2); // 1.414...mathSqrt(1); // 1mathSqrt(0); // 0mathSqrt(-1); // NaN
Returns the square root of a number.
A numeric expression.
The
mathSqrt()
function returns the square root of a number.Since
0.12.0
Param: x
A number
Returns
The square root of x, a positive number. If x is negative, NaN is returned.
Example