absolute of sin value in javascript code example Example: javascript absolute value Math.abs(-2) // 2 Math.abs(2) // 2