title: problems with Array.prototype.slice.appy(arguments, 1)
body: <p>1) I have the following code:</p>
  
  <blockquote>
  <pre><code>var callIt = function(fn) {
      return fn.apply(this, Array.prototype.slice.apply(arguments, 1));
  };
  </code></pre>
  </blockquote>
  
  <p>when callIt is called in nodejs, it complains:</p>
  
  <pre><code>    return fn.apply(this, Array.prototype.slice.apply(arguments, 1));
                                                  ^
  TypeError: Function.prototype.apply: Arguments list has wrong type
  </code></pre>
  
  <p>2) If I change the callIt to:</p>
  
  <blockquote>
  <pre><code>var callIt = function(fn) {
      return fn.apply(this, Array.prototype.slice.apply(arguments));
  };
  </code></pre>
  </blockquote>
  
  <p>Nodejs does not complain, but the result is not what expected, with the extra first argument passed in.</p>
  
  <p>3) If I change the callIt to:</p>
  
  <blockquote>
  <pre><code>var callIt = function(fn) {
      var args = Array.prototype.slice.apply(arguments);
      return Function.prototype.apply(fn, args.slice(1));
      //return fn.apply(this, args.slice(1)); //same as above
  
  };
  </code></pre>
  </blockquote>
  
  <p>It works as expected.</p>
  
  <p>4) If I run test in Chrome developer Tools Console like this:</p>
  
  <blockquote>
  <pre><code>&gt; var o={0:"a", 1:"asdf"}
  undefined
  &gt; o
  Object
  0: "a"
  1: "asdf"
  __proto__: Object
  &gt; Array.prototype.slice.call(o,1)
  []
  &gt; Array.prototype.slice.call(o)
  []
  </code></pre>
  </blockquote>
  
  <p>Now slice does not work on array-like object.</p>
  
  <p>I am baffled on these. Please explain.</p>
  
  <p>I referenced the following:
  <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array#Array_generic_methods" rel="nofollow">Array_generic_methods</a></p>