What does Name[proto][push] do? in js
<p>I found <a href="http://github.com/DmitryBaranovskiy/raphael/raw/master/raphael.js" rel="nofollow">this piece of code</a> which seems pretty cool. I see <code>return new Set(array);</code> written so i know set is a class. But what does Set[proto] mean and what does [push] mean and .pop and why is 
one a dot while the other is in square brace.</p>

<p>Also arguments[length] looks pretty cool. I imagine its an implicit parameter in each func? i am not sure how length works in this case. This looks really cool and i am very much a newbie at JS.</p>

<pre><code>// Set
var Set = function (items) {
    this.items = [];
    this[length] = 0;
    this.type = "set";
    if (items) {
        for (var i = 0, ii = items[length]; i &lt; ii; i++) {
            if (items[i] &amp;&amp; (items[i].constructor == Element || items[i].constructor == Set)) {
                this[this.items[length]] = this.items[this.items[length]] = items[i];
                this[length]++;
            }
        }
    }
};
Set[proto][push] = function () {
    var item,
        len;
    for (var i = 0, ii = arguments[length]; i &lt; ii; i++) {
        item = arguments[i];
        if (item &amp;&amp; (item.constructor == Element || item.constructor == Set)) {
            len = this.items[length];
            this[len] = this.items[len] = item;
            this[length]++;
        }
    }
    return this;
};
Set[proto].pop = function () {
    delete this[this[length]--];
    return this.items.pop();
};
</code></pre>
