How to use Math SQRT1_2 Property in JavaScript

In this article, I will explain use of Math SQRT1_2 Property in JavaScript.
  • 1822

JavaScript SQRT1_2 Property

  • SQRT1_2 property of math object returns square root of 1/2 which is approximately 0.707.




The following example is show to use of SQRT1_2property in javascript.

<!DOCTYPE html>



<h3>SQRT1_2 Property Example</h3>

<p id="demo" style=" background-color:Silver">Click the button to display the square root of 1/2</p>

<button onclick="myFunction()">Click On</button>

<script type="text/javascript">

    function myFunction() {

        document.getElementById("demo").innerHTML = Math.SQRT1_2;






SQRT 1_2 output.jpg


SQRT 1_2 final.jpg

You may also want to read these related articles here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here


More Articles

© 2020 DotNetHeaven. All rights reserved.