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