![Math sqrt Method](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEUCNGFRsVatCwcbXd5DKECFFujTwUrriibj6bt1PRjzRwncjTNQtiNkQE5sKJQpTS1nRo-ELgSzzt9YmHas1zAY2YIKzB7xcRA92d7ww-I91chOMtVc9O194smA6lJcIT_OeGDaEPWlxh/s1600/Math-Sqrt.jpg)
Math.sqrt() Method is used to return the square root of a number.
Syntax:
Math.sqrt(x)
Example:
<script> var one = Math.sqrt(3); document.writeln('Output of 3 : ' + one + '</br></br>'); var two = Math.sqrt(-4); document.writeln('Output of -4 : ' + two + '</br></br>'); var three = Math.sqrt(9); document.writeln('Output of 9 : ' + three + '</br></br>'); var four = Math.sqrt(15); document.writeln('Output of 15 : ' + four + '</br></br>'); </script>
Output
Output of 3 : 1.7320508075688772 Output of -4 : NaN Output of 9 : 3 Output of 15 : 3.872983346207417