SQRT2

The SQRT2 property returns the value of the square root of two, which is 1.4142135623730951, exactly. As with all math properties, it is used with the Math object.

syntax:

Math.SQRT2

EXAMPLE

variableOne = Math.SQRT2; documnet.write("The value of the square root of two is " + variableOne);

The example shows that the square root of two is loaded into the variableOne variable. It is then displayed with the contents of the document.write statement, which will display the following.



The value of the square root of two is 1.4142135623730951