how to declare absolute variable inside a function javascript code example Example: js absolute value Math.abs(-4)//returns 4 Math.abs(4)//returns 4