Update article.md
This commit is contained in:
parent
94c83e9e50
commit
1fece3e71e
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ alert( arr instanceof Object ); // true
|
||||||
|
|
||||||
Please note that `arr` also belongs to the `Object` class. That's because `Array` prototypally inherits from `Object`.
|
Please note that `arr` also belongs to the `Object` class. That's because `Array` prototypally inherits from `Object`.
|
||||||
|
|
||||||
The `instanceof` operator examines the prototype chain for the check, but we can set a custom logic the static method `Symbol.hasInstance`.
|
The `instanceof` operator examines the prototype chain for the check, but we can set a custom logic in the static method `Symbol.hasInstance`.
|
||||||
|
|
||||||
The algorithm of `obj instanceof Class` works roughly as follows:
|
The algorithm of `obj instanceof Class` works roughly as follows:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue