Welcome Guest! (App Version 3.1)

Math Methods

Math Methods in JS

String Library provides many features for String Manipulation of the various string data types in JavaScript. Have a look at the following table:

Math Library Methods
S.No.NameDescriptionExamplesReference
1abs()This function returns the absolute value of a number.
2acos()This function returns the arccosine (in radians) of a number.
3asin()This function returns the arcsine (in radians) of a number.
4atan()This function returns the arctangent (in radians) of a number.
5atan2()This function returns the arctangent of the quotient of its arguments.
6ceil()This function returns the smallest integer greater than or equal to a given number.
7cos()This function returns the cosine of the specified angle.
8exp()This function returns ex, where x is the argument, and e is Euler's number (also known as Napier's constant), the base of the natural logarithms.
9floor()This function returns the largest integer less than or equal to a given number.
10log()This function returns the natural logarithm (base e) of a number.
11max()This function returns the largest of zero or more numbers.
12min()This returns the lowest-valued number passed into it, or NaN if any parameter isn't a number and can't be converted into one.
13pow()This function returns the base to the exponent power, that is, baseexponent.
14random()This function returns a floating-point, pseudo-random number in the range from 0 inclusive up to but not including 1.
15round()This function returns the value of a number rounded to the nearest integer.
16sin()This function returns the sine of a number.
17sqrt()This function returns the square root of a number.
18tan()This function returns the tangent of a number.