Math.sqrt()
syntax: |
Math.sqrt(x) |
where: |
x - a number or numeric expression greater than or equal to zero.
|
return: |
number - the square root of x.
|
description: |
Returns NaN if x is a negative number or cannot be converted to a number.
|
see: |
|
example: |
//Return the square root of x: function compute_square_root(x) { return Math.sqrt(x) } //If the argument is NaN, the result is NaN //If the argument is less than 0, //the result is NaN //If the argument is +0, the result is +0 //If the argument is -0, the result is -0 //If the argument is +infinity, //the result is +infinity |