Javascript inheritance & Apply
<p>I have been looking into design patterns in Javascript and found <a href="http://tcorral.github.com/Design-Patterns-in-Javascript/Template/withoutHook/index.html" rel="nofollow">http://tcorral.github.com/Design-Patterns-in-Javascript/Template/withoutHook/index.html</a> to be a great source.</p>

<p>Can anyonne explain the significance of using <strong><em>ParentClass.apply(this)</em></strong></p>

<pre><code>var CaffeineBeverage = function(){

};
var Coffee = function(){
    CaffeineBeverage.apply(this);
};
Coffee.prototype = new CaffeineBeverage();
</code></pre>

<p>PS: I tried commenting the CaffeineBeverage.apply(this), but no effect was there. Here is a link to jsfiddle <a href="http://jsfiddle.net/pramodpv/8XqW9/" rel="nofollow">http://jsfiddle.net/pramodpv/8XqW9/</a></p>
