javascript hash keys hasOwnProperty
<p>In Javascript to find all the values in a hash I have seen the following code:</p>

<pre><code>var myHash = {};
myHash['one'] = 1;
myHash['two'] = 2;
for (var key in myHash) {
    if (myHash.hasOwnProperty(key)) {
        //do something
    }
}
</code></pre>

<p>What is the point of having the hasOwnProperty check here?</p>
