js make value positive
snippet in javascript

js make value positive

user971

Math.abs(-4)//returns 4
Math.abs(4)//returns 4