Is a instanceof b exactly equivalent to a.constructor === b? If not, what's the difference between the two?
a instanceof b
a.constructor === b
No.
instanceof also checks for "inherited" constructors.
instanceof
For more information, see the spec. (here and here)
1.4m articles
1.4m replys
5 comments
56.9k users