title: how to call same function with different parameter in javascript?
body: <pre><code>function partialize(){
  
  }
  
  function calculation(a,b,c){
    console.log(a*b/c);
    return a*b/c;
  }
  
  var a = 10, b= 20, c= 5;
  
  var partialize1 = partialize(calculation, a);
  partialize1(b,c)
  
  var partialize2 = partialize(calculation, a, b);
  partialize2(c)
  
  var partialize3 = partialize(calculation, a, b, c);
  partialize3()
  </code></pre>
  
  <p>I need to write <code>partialize</code> function which give <code>same</code> output in all <code>three</code> condition.</p>
  
  <p>I tried like that  it work .but i used spread operator .can we do this without spread operator ?</p>
  
  <pre><code> function partialize(fn,...a) {
      console.log(...a);
  
      return function (...b) {
          console.log(...b);
          fn(...a,...b);
  
      }
  
  }
  
  function calculation(a, b, c) {
      console.log(a * b / c);
      return a * b / c;
  }
  
  var a = 10, b = 20, c = 5;
  
  var partialize1 = partialize(calculation, a);
  partialize1(b, c)
  
  var partialize2 = partialize(calculation, a, b);
  partialize2(c)
  
  var partialize3 = partialize(calculation, a, b, c);
  partialize3()
  </code></pre>
  
  <p>can we do the same thing without spread operator ?</p>