diff --git a/1-js/09-classes/06-instanceof/article.md b/1-js/09-classes/06-instanceof/article.md index f9db989ca9..c3bd1e03a1 100644 --- a/1-js/09-classes/06-instanceof/article.md +++ b/1-js/09-classes/06-instanceof/article.md @@ -59,7 +59,7 @@ The algorithm of `obj instanceof Class` works roughly as follows: // anything with canEat property is an animal class Animal { static [Symbol.hasInstance](obj) { - if (obj.canEat) return true; + if ('canEat' in obj) return true; } }
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: