Math.SQRT2 property

The Math.SQRT2 property contains the square root of 2.

Syntax

javascriptMath.SQRT2;

Example

Let's output the square root of 2:

javascriptconsole.log(Math.SQRT2);

The code execution result:

javascript1.4142135623730951

See also

  • the Math.SQRT1_2 property
    that contains the square root of 1/2