Created
September 7, 2014 00:34
-
-
Save RikkiGibson/f4610aade04240d719d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(process.argv.slice(2) | |
.reduce(function(a, b) { | |
return Number(a) + Number(b) | |
})); | |
var total = 0; | |
for (var i = 2; i < process.argv.length; i++) { | |
total += parseInt(process.argv[i]); | |
} | |
console.log(total); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment