![]() |
VOOZH | about |
JavaScript Symbol hasInstance is used to determine if a given constructor object recognizes the object as its instance.
Syntax:
[Symbol.hasInstance](Object)
Parameters: It accepts a parameter "object".
Return value: This returns true if the value is in the chain of the object otherwise false.
JavaScript code to show the working of this function.
Below examples illustrate the JavaScript Symbol hasInstance Property:
Example 1:
Output:
true true true true
Example-2:
Output:
true
Supported Browsers:
We have a complete list of Javascript symbols' properties and methods, to check those please go through the Javascript Symbol Complete Reference article.