Home >>JavaScript Math Reference >JavaScript SQRT2 Property

JavaScript SQRT2 Property

JavaScript SQRT2 Property

JavaScript SQRT2 property is used to return the square root of value 2. Its result value is approximately 1.414.



Browser Support

Property Chrome Edge Firefox Safari Opera
SQRT2 Yes Yes Yes Yes Yes

Here is an example of JavaScript SQRT2 property:

<p>Click the button to see the Output.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
function myFunction() {
  document.getElementById("demo").innerHTML = Math.SQRT2;

Click the button to see the Output.