I want to know if is there any difference between these two methods of checking whether an object is an instance of a class/constructor. I searched about it and found these two ways.
obj instanceof SomeConstructor
obj.constructor === SomeConstructor
So my questions are: Is there any difference between the two?
Which one is a better practice?
Also, Is there any other way better than these two?