Can you fake out Array.isArray() with a user-defined object?
<p>I'm curious about whether there is any way to fake out <code>Array.isArray()</code> with a user-defined object.</p>

<p>From the book JavaScript Patterns:</p>

<pre><code>Array.isArray([]); // true

// trying to fool the check
// with an array-like object
Array.isArray({
  length: 1,
  "0": 1,
  slice: function () {}
}); // false
</code></pre>

<p>That object clearly fails, but is there any other way to do it? This is sheer curiosity, and not because I think that you could ever screw with <code>.isArray()</code> in regular client code (though it would obviously be fantastic to know if you could!).</p>
