What is instanceof operator?

To know is what type of object it is JavaScript provides the instanceof operator. Its syntax:

result = variable instanceof constructor
The instanceof operator returns true if the variable is an instance of the given reference type.