typo
This commit is contained in:
parent
1536666ae0
commit
c8eb0135c2
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ The algorithm of `obj instanceof Class` works roughly as follows:
|
||||||
alert(obj instanceof Animal); // true: Animal[Symbol.hasInstance](obj) is called
|
alert(obj instanceof Animal); // true: Animal[Symbol.hasInstance](obj) is called
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Most classes do not have `Symbol.hasInstance`. In that case, the standard logic is used: `obj instanceOf Classs` checks whether `Class.prototype` equals to one of prototypes in the `obj` prototype chain.
|
2. Most classes do not have `Symbol.hasInstance`. In that case, the standard logic is used: `obj instanceOf Class` checks whether `Class.prototype` equals to one of prototypes in the `obj` prototype chain.
|
||||||
|
|
||||||
In other words, compare:
|
In other words, compare:
|
||||||
```js
|
```js
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue