# What are JavaScript Math Functions?

JavascriptWeb DevelopmentFront End Technology

#### JavaScript for beginners

Best Seller

74 Lectures 10 hours

#### Modern Javascript for Beginners + Javascript Projects

Most Popular

112 Lectures 15 hours

#### The Complete Full-Stack JavaScript Course!

Best Seller

96 Lectures 24 hours

The following are some of the Math Functions in JavaScript −

S.No
Method & Description
1
abs()
Returns the absolute value of a number.
2
acos()
Returns the arccosine (in radians) of a number.
3
asin()
Returns the arcsine (in radians) of a number.
4
atan()
Returns the arctangent (in radians) of a number.
5
atan2()
Returns the arctangent of the quotient of its arguments.

6
ceil()
Returns the smallest integer greater than or equal to a number.

## Example

Let’s see an example of abs() Math function in JavaScript. The Math() function returns the absolute value of a number −

<html>
<title>JavaScript Math abs() Method</title>
<body>
<script>
var value = Math.abs(-1);
document.write("First Value : " + value );

var value = Math.abs(5);
document.write("<br />Second Value : " + value );

var value = Math.abs("string");
document.write("<br />Third Value : " + value );
</script>
</body>
</html>