title: How to pass arguments array to another function in JavaScript?
body: <p>I have a function in JavaScript:</p>
  
  <pre><code>function test() {
    console.log(arguments.length);
  }
  </code></pre>
  
  <p>if I call it with <code>test(1,3,5)</code>, it prints out <code>3</code> because there are 3 arguments. How do I call test from within another function and pass the other function's arguments?</p>
  
  <pre><code>function other() {
    test(arguments); // always prints 1
    test(); // always prints 0
  }
  </code></pre>
  
  <p>I want to call <code>other</code> and have it call <code>test</code> with its <code>arguments</code> array.</p>