loading...

re: With great prototype power comes great responsibility VIEW POST

TOP OF THREAD FULL DISCUSSION
re: let Object.prototype.hasOwnProperty() to the rescue if (obj.hasOwnProperty('a')) { }
 

Yeah, thanks for mentioning this method. But using hasOwnProperty will console.log different result in the post's example, so use it with caution.

code of conduct - report abuse