Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5629b6b

Browse files
Fix minor typo
1 parent 540d753 commit 5629b6b

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)

AltStyle によって変換されたページ (->オリジナル) /