What is returned in a jQuery function?
<p>I'm trying to understand what's inside a jQuery select, so I wrote this to alphabetically sort the properties:</p>

<pre><code>var X = $('p:first');
console.log(X);
$(X).each(function(index,Element) {
    var prop;
    var arr = [];
    for (prop in Element) {
        arr[arr.length] = prop;
    }
    arr = arr.sort();
    for (var i=0,ii=arr.length;i&lt;ii;i++) {
        console.log(arr[i]);
    }
});
</code></pre>

<p>Is this the way that you would sort the property names, or am I working too hard?</p>
