Javascript sum function
<p>I need a js sum function to work like this:</p>

<pre><code>sum(1)(2) = 3
sum(1)(2)(3) = 6
sum(1)(2)(3)(4) = 10 
etc.
</code></pre>

<p>I heard it can't be done. But heard that if adding <code>+</code> in front of <code>sum</code> can be done.
Like <code>+sum(1)(2)(3)(4)</code>. <br>Any ideas of how to do this?</p>

<p>Please, before submiting your answers, read the question. This question is of academic interest. I will downvote answers of people who even didnt read the question. Thanks.</p>
