What is the purpose of the instanceof operator in JavaScript?
instanceof
It checks if a class implements an interface.
It checks if a class has a specific method.
It checks if an object is an instance of a class.
It checks if a class is a subclass of another class.