KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In some of my own older code, I use the following: Object.prototype.instanceOf = function( iface ) { return iface.prototype.isPrototypeOf( this ); }; Then I do (for example) [].instanceOf( Array ) This works, but it seems the following would do the same: [] instanceof Array Now, surely this is only a very simple example. My question therefore is: Is a instanceof b ALWAYS the same as b.prototype.isPrototypeOf(a) ?
Tags (comma-separated)
Save Edits
Cancel