JavaScript : - Math Object



Hello Friends..!!

This is JavaScript Practical: - Math Object.
Script written in small letter because JavaScript Case Sensitive.

Script:-
<html>
<head>
<title>  my web pages   </title></head>
<body>
<script language="javascript" type="text/javascript">
var a=12;
var b=20.3655;
var c=-855;
var d=856;
var pi=3.14;
document.write(Math.abs(c));
document.write("<br />");
document.write(Math.round(b));
document.write("<br />");
document.write(Math.pow(a,2));
document.write("<br />");
document.write(Math.PI);
document.write("<br />");
document.write(Math.random(d));
</script>
</body>
</html>
Save the File .html

Output:-


If you have any doubts mention on the Comment Box.

Please follow my Blog, Share and Comment.

Comments

Popular posts from this blog

What is Website