Why when executing this piece of code, only checking for thisThrowsError
actually throws error, but querying for non existent property on the prototype object or on this
context doesn't?
function Test()
{
if(this.someVar){}
if(Test.prototype.someVar){}
if(thisThrowsError){}
}
var test = new Test();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.