Latest web development tutorials

JavaScript SQRT2 property

Math Object Reference JavaScript Math Object

Examples

Returns the square root of 2:

Math.SQRT2;

Output:

1.4142135623730951

try it"

Definition and Usage

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


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support SQRT2 property.


grammar

Math.SQRT2

technical details

return value: A number of returns the square root of two.
JavaScript version: 1.0


Math Object Reference JavaScript Math Object