December 2013
Intermediate to advanced
384 pages
9h 54m
English
Math.abs(-5); //returns 5 Math.abs(5); //returns 5 Math.abs("-15"); //returns 15 Math.abs("0xFF"); //returns 255
The Math.abs(x) method returns the absolute value of x. The variable x can be a number or a numerical string such as "5", "-5", or "0xFF".
Read now
Unlock full access