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

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -