- Math.PI: If we want use the value of PI (3.14159) in mathematical operation then we can use simply Math.PI.
- abs() : The abs() method returns the absolute value of the number passed as its parameter. Essentially, this means that it returns the positive value of the number. So, -1 is returned as 1.
var num=-101; num=Math.abs(num);
var num=101.01; num=Math.ceil(num); num= parseInt(num);
- floor() : The floor() method removes any numbers after the decimal point, and returns a whole or integer.
- round() : The round() method rounds up only if the decimal part is .5 or greater, and rounds down otherwise.
- pow() : The pow() method raises a number to a specified power. Math.pow(2,8)