JavaScript Math.abs()

Math.abs(x) returns the absolute (positive) value of x: