jQuery objects are internally converted to JavaScript arrays, how do I copy that behavior?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/7261670/what-makes-a-jquery-object-show-up-as-an-array-in-chromes-developer-tools">What makes a jQuery object show up as an array in Chrome&#39;s Developer Tools?</a>  </p>
</blockquote>



<p>I am writing a very small, jQuery-like, DOM wrapper in JavaScript, containing only the (few) functions I need most. I have noticed that, when I log a jQuery object to the console of my browser, the object is actually an array. For example: [Document]. I would like to copy that behavior. Can anyone explain me how jQuery does this internally, or even better point me to some relevant lines in the jQuery source code?
I know that objects and arrays in JavaScript have much in common, but jQuery seems to return true arrays for the $ selections, not objects.
I have already read the following post on stackoverflow but it doesn't seem to answer my question:</p>

<p><a href="http://stackoverflow.com/questions/9233814/are-javascript-arrays-actually-implemented-as-arrays">Are javascript Arrays actually implemented as arrays?</a></p>
