Some Properties of the Math Object
<script>document.write("Euler's constant - " + Math.E + "<br>Mmmm Pi - " + Math.PI + "<br>");
</script>
"Hey there you little sqrt."
<script>var n = prompt("Enter a Number", "");
var answer = Math.sqrt(n);
alert("The square root of " + n + " is " + answer);
</script>
No comments:
Post a Comment