title: Write a Currying with multiple parameters
body: <p>In a recent interview, I was asked to write a function that adds numbers and accepts parameters like this:</p>
  <pre><code>console.log(sum())
  console.log(sum()())
  console.log(sum(1));
  console.log(sum(1)());
  console.log(sum(1)(2)()); 
  console.log(sum(1, 2)()); 
  console.log(sum(1)(2)(3)()); 
  console.log(sum(1)(2, 3)()); 
  console.log(sum(1)(2, 3)); 
  console.log(sum(1)(2)(3)(4)()); 
  console.log(sum(1)(2, 3, 4)());
  console.log(sum(1, 2, 3, 4)()); 
  console.log(sum(1, 2, 3, 4)); 
  </code></pre>
  <p>But I am not able to solve below answer, how to get default as 0 in below output?</p>
  <pre><code>console.log(sum())
  console.log(sum()())
  </code></pre>