javascript - Querying for non existent property doesn't always throw error -


why when executing piece of code, checking thisthrowserror throws error, querying non existent property on prototype object or on this context doesn't?

function test() {      if(this.somevar){}     if(test.prototype.somevar){}       if(thisthrowserror){}  }  var test = new test(); 

see: why undefined variable in javascript evaluate false , throw uncaught referenceerror?


Comments

Popular posts from this blog

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -