Are these two ways of constructing an object in JavaScript equivalent?
<p>Given:</p>

<pre><code>    function A(name) {
        this.name = name;
    }
</code></pre>

<p>is:</p>

<pre><code>    var a1 = new A("A1");
</code></pre>

<p>exactly equivalent to:</p>

<pre><code>    var a1 = {};
    A.call(a1, "A1");
    a1.__proto__ = A.prototype;
</code></pre>

<p>?</p>

<p>Thanks</p>
