101
JavaScript Symbol.hasInstance Property
The JavaScript Symbol.hasInstance is used to determine if a constructor object recognizes an object as its instance.
Syntax
Parameters
An object as one of the constructor.
Return value
Return true if the value is in the chain of an object, otherwise false.
Browser Support
Chrome | 5.1 |
Safari | Yes |
Firefox | 50 |
Opera | Yes |
Example 1
Output:
true
Example 2
Output:
true.
Next TopicJavaScript Symbol