up
This commit is contained in:
parent
ab9ab64bd5
commit
97c8f22bbb
289 changed files with 195 additions and 172 deletions
|
@ -1,7 +0,0 @@
|
|||
Yeah, looks strange indeed.
|
||||
|
||||
But `instanceof` does not care about the function, but rather about its `prototype`, that it matches against the prototype chain.
|
||||
|
||||
And here `a.__proto__ == B.prototype`, so `instanceof` returns `true`.
|
||||
|
||||
So, by the logic of `instanceof`, the `prototype` actually defines the type, not the constructor function.
|
Loading…
Add table
Add a link
Reference in a new issue