TypeError: Xjs("hi").getName is not a function showing in firebug console
<p>Why is this code showing an error in Firebug?</p>

<pre><code>var Xjs =function(name){
    if(!(this instanceof Xjs)) return new Xjs(name)
};
Xjs.prototype={
    constructor:Xjs,
    Xjs:function(){this.name=name;},
    getName:function(){
        alert(this.name);
    }
}
</code></pre>

<p>In Firebug:</p>

<pre><code>Xjs('hi').getName();
</code></pre>
