math.absolute in javascript code example
Example 1: javascript absolute value
Math.abs(-2) // 2
Math.abs(2) // 2
Example 2: how to get an absolute in js
var value = Math.abs(-10);
// value returns 10
Math.abs(-2) // 2
Math.abs(2) // 2
var value = Math.abs(-10);
// value returns 10