Math Objects in JavaScript

The blog provides the details on the usage of JavaScript Math Object. The Math object in JavaScript helps in evaluating math operations.

Math Methods in JavaScript

The below given are the supported Math methods in JavaScript to perform math operations

Math MethodsMethod Description
abs()The method returns the absolute value of the given number.
abs() is a static method of Math Object.
acos()The method returns the arccosine of the given number in radians.
asin()The method returns the arcsine of the given number in radians.
atan()The method returns the arc-tangent of the given number in radians.
cbrt()The method returns the cube root of the given number.
ceil()The method returns a smallest integer value, greater than or equal to the given number.
cos()The method returns the cosine of the given number.
cosh()The method returns the hyperbolic cosine of the given number.
exp()The method returns the exponential form of the given number.
floor()The method returns largest integer value, lower than or equal to the given number.
hypot()The method returns square root of sum of the squares of given numbers.
log()The method returns natural logarithm of a number.
max()The method returns maximum value of the given numbers.
min()The method returns minimum value of the given numbers.
pow()The method returns value of base to the power of exponent.
random()The method returns random number between 0 (inclusive) and 1 (exclusive).
round()The method returns closest integer value of the given number.
sign()The method returns the sign of the given number
sin()The method returns the sine of the given number.
sinh()The method returns the hyperbolic sine of the given number.
aqrt()The method returns the square root of the given number
tan()The method returns the tangent of the given number.
tanh()The method returns the hyperbolic tangent of the given number.
trunc()The method returns an integer part of the given number.
Exit mobile version