Home >>JavaScript Math Reference >JavaScript SQRT1_2 Property

JavaScript SQRT1_2 Property

JavaScript SQRT1_2 Property

JavaScript SQRT1_2 property is used to return the square root of ½. Its value is approximately 0.707.

Syntax:

Math.SQRT1_2

Browser Support

Property Chrome Edge Firefox Safari Opera
SQRT1_2 Yes Yes Yes Yes Yes

Here is an example of JavaScript SQRT1_2 property:

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

Click the button to see the Output.