Hi guys I just started learning node today, and am a little confused as to 
how to go about the second exercise....

at first i had:

var num1 = +process.argv[2];
var num2 = +process.argv[3];
var result = num1 + num2;

console.log(result);

...but this will only work for 2 numbers. any ideas on how to loop through 
process.argv to account for multiple number inputs??

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/6ea4fd6a-acb3-497e-898b-ff7b32a99f2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to