Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to split two digit number in javascript

for (var i = 0, sum = 0; i < output.length; sum += output[i++]);
console.log(sum);

/*
 * Outputs: 39
 */
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #split #digit #number #javascript
ADD COMMENT
Topic
Name
4+1 =