hasOwnProperty in javascript
<pre><code>function Shape() {
    this.name = "Generic";
    this.draw = function() {
        return "Drawing " + this.name + " Shape";
    };
}

function welcomeMessage()
{
    var shape1 = new Shape();
    //alert(shape1.draw());
    alert(shape1.hasOwnProperty(name));  //this is returning false
}
</code></pre>

<p>"welcomeMessage" called on the body.onload event.
I expected shape1.hasOwnProperty(name) to return true. But its returning false. 
Whats the correct behavior?</p>
