Abs similar to jquery
Get the absolute value of a number in Javascript
Return the absolute value of a number:
Math.abs(-90.83); // Output 90.83More Examples
Return the absolute value of different numbers:
var a = Math.abs(90.83); var b = Math.abs(-90.83); var c = Math.abs(null); var d = Math.abs("Hello"); var e = Math.abs(2+3);The result of a,b,c,d, and e will be:
90.83 90.83 0 NaN 5
Abs similar to jquery
Reviewed by Bhaumik Patel
on
8:10 AM
Rating: