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)
2.1m questions
2.1m answers
60 comments
56.9k users