Update two article.md files
Recently you removed `e.g. Python` but forgot `like`. Corrected `prototypally` to `prototypically`.
This commit is contained in:
parent
87f86eaf6d
commit
347dc0610a
2 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ alert( arr instanceof Array ); // true
|
||||||
alert( arr instanceof Object ); // true
|
alert( arr instanceof Object ); // true
|
||||||
```
|
```
|
||||||
|
|
||||||
Please note that `arr` also belongs to the `Object` class. That's because `Array` prototypally inherits from `Object`.
|
Please note that `arr` also belongs to the `Object` class. That's because `Array` prototypically inherits from `Object`.
|
||||||
|
|
||||||
Normally, `instanceof` operator examines the prototype chain for the check. We can also set a custom logic in the static method `Symbol.hasInstance`.
|
Normally, `instanceof` operator examines the prototype chain for the check. We can also set a custom logic in the static method `Symbol.hasInstance`.
|
||||||
|
|
||||||
|
|
|
@ -201,7 +201,7 @@ And `eventMixin` mixin makes it easy to add such behavior to as many classes as
|
||||||
|
|
||||||
*Mixin* -- is a generic object-oriented programming term: a class that contains methods for other classes.
|
*Mixin* -- is a generic object-oriented programming term: a class that contains methods for other classes.
|
||||||
|
|
||||||
Some other languages like allow multiple inheritance. JavaScript does not support multiple inheritance, but mixins can be implemented by copying methods into prototype.
|
Some other languages allow multiple inheritance. JavaScript does not support multiple inheritance, but mixins can be implemented by copying methods into prototype.
|
||||||
|
|
||||||
We can use mixins as a way to augment a class by multiple behaviors, like event-handling as we have seen above.
|
We can use mixins as a way to augment a class by multiple behaviors, like event-handling as we have seen above.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue