JavaScript Methods: Math.abs()

By: Dusty Arlia
Published on Thursday, November 7, 2013, 08:20 AM
Last Updated on Saturday, July 11, 2015 at 7:18 PM
Total Updates: 3

If you need to get the absolute value of a number, you can use the abs() method of the Math object. Here is the basic syntax:

Math.abs(your_number)

The value returned by this method is the absolute value of your_number.

Comments:

Ad:

Ad: