Skip to content

Commit 9d2cce2

Browse files
committed
Fix minor typo
1 parent 540d753 commit 9d2cce2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The algorithm of `obj instanceof Class` works roughly as follows:
5555
For example:
5656

5757
```js run
58-
// setup instanceOf check that assumes that
58+
// setup instanceof check that assumes that
5959
// anything with canEat property is an animal
6060
class Animal {
6161
static [Symbol.hasInstance](obj) {
@@ -68,7 +68,7 @@ The algorithm of `obj instanceof Class` works roughly as follows:
6868
alert(obj instanceof Animal); // true: Animal[Symbol.hasInstance](obj) is called
6969
```
7070

71-
2. Most classes do not have `Symbol.hasInstance`. In that case, the standard logic is used: `obj instanceOf Class` checks whether `Class.prototype` is equal to one of the prototypes in the `obj` prototype chain.
71+
2. Most classes do not have `Symbol.hasInstance`. In that case, the standard logic is used: `obj instanceof Class` checks whether `Class.prototype` is equal to one of the prototypes in the `obj` prototype chain.
7272

7373
In other words, compare one after another:
7474
```js

0 commit comments

Comments
 (0)