JavaScript Math Object

JavaScript Math Object


JavaScript Math Object
In this tutorial, you will learn about JavaScript math objects as follows: The JavaScript Math object helps us to perform mathematical tasks on numbers.
The Syntax of the Math object is as follow:
Math.property 
Example 
Output
Example2
Output
There are some Math Object and their Description: 
 
Math Object 
 
Description
 
Math.E
 
Returns Euler’s number
 
Math.PI
 
Returns PI
 
Math.SQRT2
 
Returns the square root of 2
 
Math.SQRT_2
 
Returns the square root of 1/2
 
Math.LN10
 
Returns the natural logarithm of 2
 
Math.LOG2E
 
Returns the base 2 logarithm of E
 
Math.LOG10E
 
Returns the base 10 logarithm of E
 
Math.LN2
 
Returns the natural logarithm of 2