top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are the Math Constants and Functions in JavaScript?

0 votes
445 views
What are the Math Constants and Functions in JavaScript?
posted Jul 18, 2014 by Karamjeet Singh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

The Math object contains useful constants such as Math.PI, Math.E

Math.abs(value); //absolute value
Math.max(value1, value2); //find the largest
Math.random() //generate a decimal number between 0 and 1
Math.floor(Math.random()*101) //generate a decimal number between 0 and 100

answer Jul 22, 2014 by Rahul Mahajan
...