Created
August 11, 2017 14:09
-
-
Save jslnriot/8f9169bd69b0cbbd9e863cc92e97deeb 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
const argumentList = process.argv; | |
const addThese = argumentList.slice(2,argumentList.length); | |
let sum = 0; | |
let solution = addThese.forEach((value) => { | |
// convert to a number | |
sum += Number(value); | |
return sum; | |
}); | |
console.log("The sum = " + sum); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment