Update article.md

This commit is contained in:
Mau Di Bert 2019-07-03 07:03:33 -03:00 committed by GitHub
parent 94c83e9e50
commit 1fece3e71e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: