Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

JavaScript SQRT2 Property

JavaScript SQRT2 Property

Math Object Reference JavaScript Math object

Example

Return the square root of 2:

Math.SQRT2;

Output result:

1.4142135623730951

Try it »


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, returns the square root of 2.
JavaScript version: 1.0

Math Object Reference JavaScript Math object