Home » JavaScript Symbol hasInstance Property

JavaScript Symbol hasInstance Property

by Online Tutorials Library

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

You may also like