From 255e4268278763e7e3dad912cb59be7759992f25 Mon Sep 17 00:00:00 2001 From: Katherine Prudnik Date: Wed, 10 Apr 2024 23:38:47 +0300 Subject: [PATCH] fix: change the condition within the Animal[Symbol.hasInstance] to match the purpose of the method --- 1-js/09-classes/06-instanceof/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } }