Home »
JavaScript
Math.SQRT2 Property with Example in JavaScript
JavaScript | Math.SQRT2 Property: Here, we are going to learn about the PI Property of Math class in JavaScript with Examples.
Submitted by Shivang Yadav, on February 03, 2020
JavaScript | Math.SQRT2 Property
Math.SQRT2 is a property in math library of JavaScript that is used to find the value of square root of 2. It is generally used to solve problems related to circular figures.
Syntax
Math.SQRT2
Parameters
Return Value
The return type of this method is number, it returns the value of SQRT2.
Browser support
Chrome, Internet explorer, Mozilla, Safari, Opera mini.
Example 1
console.log(Math.SQRT2);
Output
1.4142135623730951
Example 2: Invalid values
console.log(Math.SQRT2("Javascript"));
Output
Uncaught TypeError: Math.SQRT2 is not a function
at <anonymous>:1:18
JavaScript Math Object Methods »