# What are JavaScript Math Functions?

JavascriptWeb DevelopmentFront End Technology

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>
Published on 16-Feb-2018 07:31:20