JavaScript – Math.floor() Method
The Math.floor() method returns a number rounded down to the nearest integer.
The Math.floor() method returns a number rounded down to the nearest integer.
The Math.fround() method returns the nearest 32-bit single-precision-float representation of a number.
The Math.log() method returns the natural logarithm (base E) of a number.
The Math.log1p() method returns the natural logarithm (base E) of 1 + a number.
The Math.max() method returns the number with the highest value from one or more numbers.
The Math.min() method returns the number with the lowest value from one or more numbers.
The Math.pow() method returns the value of x to the power of y (e.g., xy).
The Math.random() method returns a random number from 0 (inclusive) up to but not including 1 (exclusive).
The Math.round() method rounds a number to the nearest integer. For example, 1.49 will be rounded down to 1, while 1.5 will be rounded up to 2.
The Math.sign() method returns whether a number is negative, positive or zero.
The Math.sin() method returns the sine of a number (entered in radians). The returned number will be between -1 and 1.
The Math.trunc() method returns the integer part of a number by removing everything after the decimal point. It does not round the number.
The navigator.javaEnabled() method returns “true” if Java is enabled in the browser, and will return “false” if Java is disabled.
The Number.isFinite() method returns true if a number is finite (not Infinity, -Infinity, or NaN).