what effect does the 'new' have in a JS method?
<p>What is the difference between these two methods?</p>

<pre><code>function ObjectB() {
    this.methodA = new function() {
        alert('a');
    };
    this.methodB = function() {
        alert('b');
    };
}
</code></pre>

<p>What I am trying to ask, is what effect does the <strong>new</strong> have in a JS method?</p>

<p>I've done a fiddle where I wanted to explore the behaviour of the methods, and I have also added this code :</p>

<pre><code>var v = Object.create(ObjectB);
v.methodC = function() {
    alert('c');
}

v.methodB();
v.methodA();
v.methodC();
</code></pre>

<p>But my fiddle doesnt seem to work.</p>

<p>Fiddle is here : <a href="http://jsfiddle.net/N8SNG/" rel="nofollow">http://jsfiddle.net/N8SNG/</a></p>

<p>Thanks :)</p>
