Symbol.hasInstance JavaScript

The JavaScript Symbol.hasInstance property finds out that a constructor object recognizes an object as its instance or not. Syntax: [Symbol.hasInstance] (object) Parameters: object: It represents the specific object to be checked as a symbol instance. Returns: It returns true if the object is an instance of a symbol, otherwise returns false. Example 1: <!DOCTYPE html> … Read more