Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

absolute sum javascript


Math.abs('-1');     // 1
Math.abs(-2);       // 2
Math.abs(null);     // 0
Math.abs("string"); // NaN
Math.abs();         // NaN

Source by w3programmers.org #
 
PREVIOUS NEXT
Tagged: #absolute #sum #javascript
ADD COMMENT
Topic
Name
9+7 =