JavaScript Number
22 functions
Math.absMath.abs(x)Returns the absolute value of a number.
Math.ceilMath.ceil(x)Returns the smallest integer greater than or equal to a given number.
Math.floorMath.floor(x)Returns the largest integer less than or equal to a given number.
Math.roundMath.round(x)Returns the value of a number rounded to the nearest integer.
Math.maxMath.max(...values)Returns the largest of the given numbers.
Math.minMath.min(...values)Returns the smallest of the given numbers.
Math.powMath.pow(base, exponent)Returns the base to the exponent power.
Math.sqrtMath.sqrt(x)Returns the positive square root of a number.
Math.randomMath.random()Returns a floating-point, pseudo-random number between 0 and 1.
Math.truncMath.trunc(x)Returns the integer part of a number by removing any fractional digits.
Math.signMath.sign(x)Returns 1 for positive, 0 for zero, and -1 for negative numbers.
Math.logMath.log(x)Returns the natural logarithm (base e) of a number.
Math.log2Math.log2(x)Returns the base 2 logarithm of a number.
Math.log10Math.log10(x)Returns the base 10 logarithm of a number.
Math.sinMath.sin(x)Returns the sine of a number (in radians).
Math.cosMath.cos(x)Returns the cosine of a number (in radians).
Number.parseIntNumber.parseInt(string, radix?)Parses a string argument and returns an integer.
Number.parseFloatNumber.parseFloat(string)Parses a string argument and returns a floating-point number.
Number.isIntegerNumber.isInteger(value)Determines whether the passed value is an integer.
Number.isFiniteNumber.isFinite(value)Determines whether the passed value is a finite number.
Number.isNaNNumber.isNaN(value)Determines whether the passed value is NaN.
toFixed(number).toFixed(digits)Formats a number using fixed-point notation.
