Skip to content

Commit 59e01a7

Browse files
authored
Merge pull request #1421 from paroche/patch-51
Update article.md
2 parents 1a03d6b + f889f3e commit 59e01a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

1-js/09-classes/06-instanceof/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Here's the illustration of what `rabbit instanceof Animal` compares with `Animal
105105
106106
By the way, there's also a method [objA.isPrototypeOf(objB)](mdn:js/object/isPrototypeOf), that returns `true` if `objA` is somewhere in the chain of prototypes for `objB`. So the test of `obj instanceof Class` can be rephrased as `Class.prototype.isPrototypeOf(obj)`.
107107

108-
That's funny, but the `Class` constructor itself does not participate in the check! Only the chain of prototypes and `Class.prototype` matters.
108+
It's funny, but the `Class` constructor itself does not participate in the check! Only the chain of prototypes and `Class.prototype` matters.
109109
110110
That can lead to interesting consequences when `prototype` property is changed after the object is created.
111111

0 commit comments

Comments
 (0)