Function.prototype[Symbol.hasInstance]()
Function.prototype[Symbol.hasInstance]() is a JavaScript method in the Function category. Used by instanceof to check inheritance. The syntax is func[Symbol.hasInstance](value). A typical example: class MyClass { static [Symbol.hasInstance](x) { return x % 2 === 0 } }. A close sibling is Function.prototype.call(), which calls a function with a given this value and individual args. A close sibling is Function.prototype.apply(), which calls a function with a given this value and args as an array. A close sibling is Function.prototype.bind(), which creates a new function with a bound this. A close sibling is Function.prototype.toString(), which returns the source code of the function. More about this category: Function methods — call, apply, bind, and more. Related Function methods: Function.prototype.call(), Function.prototype.apply(), Function.prototype.bind(), Function.prototype.toString(), Function.length, Function.name, Function.prototype.constructor. This page is part of the free JS Reference documentation covering 1027+ methods, each with syntax, parameters, return values, examples, and common pitfalls.