Why is the apply() function needed in the constructor
<pre><code>function Set() {          // This is the constructor
    this.values = {};     
    this.n = 0;          
    this.add.apply(this, arguments);  // All arguments are values to add
}

// Add each of the arguments to the set.
Set.prototype.add = function() {
    /* Code to add properties to the object's values property */
    return this;
};
</code></pre>

<p>This is the beginning of the code used in "Javascript: The Definitive Guide" to create a 'Set' Class.  I've tried to rationalize the necessity of the <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/apply" rel="nofollow"><code>apply()</code></a> function in the constructor but can not figure it out for the life of me.</p>

<pre><code>this.add.apply(this, arguments);
</code></pre>

<p>if the <code>add()</code> function is already a method called by '<code>this</code>' then what purpose or use is the core <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/apply" rel="nofollow"><code>apply()</code></a> function fulfilling.  Thanks in advance to anyone who attempts to explain this to me</p>

<p><a href="http://jsfiddle.net/Marlin/Ydwgv/" rel="nofollow">http://jsfiddle.net/Marlin/Ydwgv/</a> - Full Example from Javascript: The Definitive Guide</p>
