

Learn You The Node.js - jamescarl
http://jamescarl.us/blog/learn-you-the-node-js/

======
mneary
A far cleaner solution:

    
    
        console.log(process.argv.slice(2).reduce(function(a, x) {
          return a + parseFloat(x) 
        }, 0));

~~~
dsego
Why is that cleaner? A for-loop is one of the basic programming constructs.

~~~
mneary
A for-loop might be a basic programming construct, but it shouldn't be.
Mutation and a control flow construct makes for a much worse outlook to the
problem than does recursive application of a function.

------
Scryptonite
Least bytes?

    
    
      var a=process.argv,i=a.length,x=0;while(i>2)x-=-a[--i];console.log(x)

~~~
jamescarl
That's a neat approach! Thanks

