Tutorials » Javascript tutorials »

Math Object - Example

This article explains about JavaScript Math object

Let's have a look at simple example that deals working with some of the math object 's functions.



<h2>Math Object demo</h2>

<script type="text/javascript">

alert("Absolute: "+ Math.abs(-2))

alert("PI: " + Math.PI)

alert("cos: " + Math.cos(0) )





In a similer mannar we can work with other functions of the math object too.

Next Chapter: The Boolean Object
Previous Chapter: The Math Object
More Chapters: Javascript Tutorials
More Tutorials: Tutorial Index

Top Contributors
    Last 7 Daysmore...

    Awards & Gifts

    Online Members

    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India