Math.PI, this Math property will return the Pie Value
Math.round(x) returns the rounded value of x , here is an example
Math.ceil(x) returns the rounded up to its nearest integer AND Math.floor(x) rounded down to its nearest integer:
Math.pow(x, y) returns the value of x to the power of y (base to the exponent power).
document.write(" Math.pow(10,2); : returns " + Math.pow(10, 2));
Math.sqrt(x) returns the square root value of x:
Math.random() returns a random number between given range, 0 (inclusive), and 1 (exclusive):
If you keep on refreshing this page the random number will also keep on changing on this page, try refresh
Math.max() and Math.min()
Math.max() and min function
Math.min() is used to find the lowest and highest value of any given arguments, let's look at the example below.
Following function will find the lowest value from array.
Math.abs(x) returns an absolute positive value of a number:
Math.cos(x) returns an Cosine value of a number:
Math.tan(x) returns the tangent value of a number:
Math.sin(x) returns the Sine value of a number:
Math.log(x) returns the logarithmic value of a number: