Skip to content

Commit 3c2b027

Browse files
authored
Merge pull request #1795 from zhang1pr/master
Fix typos
2 parents d19401e + 6ee0d97 commit 3c2b027

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

1-js/09-classes/02-class-inheritance/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ It works as intended, due to `[[HomeObject]]` mechanics. A method, such as `long
438438

439439
As we've known before, generally functions are "free", not bound to objects in JavaScript. So they can be copied between objects and called with another `this`.
440440
441-
The very existance of `[[HomeObject]]` violates that principle, because methods remember their objects. `[[HomeObject]]` can't be changed, so this bond is forever.
441+
The very existence of `[[HomeObject]]` violates that principle, because methods remember their objects. `[[HomeObject]]` can't be changed, so this bond is forever.
442442

443443
The only place in the language where `[[HomeObject]]` is used -- is `super`. So, if a method does not use `super`, then we can still consider it free and copy between objects. But with `super` things may go wrong.
444444

@@ -478,7 +478,7 @@ tree.sayHi(); // I'm an animal (?!?)
478478
*/!*
479479
```
480480

481-
A call to `tree.sayHi()` shows "I'm an animal". Definitevely wrong.
481+
A call to `tree.sayHi()` shows "I'm an animal". Definitely wrong.
482482

483483
The reason is simple:
484484
- In the line `(*)`, the method `tree.sayHi` was copied from `rabbit`. Maybe we just wanted to avoid code duplication?

0 commit comments

Comments
 (0)