Javatpoint Logo
Javatpoint Logo

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

Test it Now

Output:

true

Example 2

Test it Now

Output:

true.

Next TopicJavaScript Symbol




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA