JavaScript Math

The Math.abs() Method

Math.abs() returns the absolute value of a number: