Undefined, typeof undefined, hasOwnProperty
<p>Take this snippet,</p>

<pre><code>var a = {

}

if(typeof a.c === 'undefined'){
 console.log('inside if');
}
if(a.c === undefined){
 console.log('inside if');
}
</code></pre>

<p>Both <code>if</code> results in <code>true</code>. <strong>Is there any difference in both statements specific to some browsers?</strong></p>

<p>Also, in my last project I have already used <code>typeof a.c == 'undefined'</code> numerous times to check values in <code>json</code> data.</p>

<p>Now, I know that this is not good way, as some value may be <code>undefined</code> too, so my logic will fail. </p>

<p>I should have used <code>hasOwnProperty</code> .</p>

<p>But I am sure that no value will be <code>undefined</code> , can I use <code>typeof a.c == 'undefined'</code> in place of <code>hasOwnProperty</code> or should I change all my <code>typeof</code> with <code>hasOwnProperty</code></p>
