JavaScript SQRT2Property

Math 对象参考手册JavaScript Math Object

Example

Return the square root of 2:

Math.SQRT2;

Output result:

1.4142135623730951

Try it Yourself »

Definition and Usage

The SQRT2 property returns the square root of 2. This value is approximately 1.4142135623730951.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the SQRT2 property.


Syntax

Math.SQRT2

Technical Details

Return value: A number, representing the square root of 2.
JavaScript Version: 1.0


Math 对象参考手册JavaScript Math Object

Other Extensions