Computer >> Computer tutorials >  >> Programming >> Javascript

Math.SQRT2 Property in JavaScript


The SQRT2 property of the Math object represents the square root of 2.

Syntax

Its Syntax is as follows

Math.SQRT2

Example

<html>
<head>
   <title>JavaScript Example</title>
</head>
<body>
   <script type="text/javascript">
      var result = Math.SQRT2;
      document.write(result);
   </script>
</body>
</html>

Output

1.4142135623730951