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

Chrome5.1
SafariYes
Firefox50
OperaYes

Example 1

Test it Now

Output:

true

Example 2

Test it Now

Output:

true.





Latest Courses