-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: translate
prototype inheritance
article
Prototypal inheritance
- Loading branch information
Showing
10 changed files
with
144 additions
and
144 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
1-js/08-prototypes/01-prototype-inheritance/1-property-after-delete/solution.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
1. `true`, taken from `rabbit`. | ||
2. `null`, taken from `animal`. | ||
3. `undefined`, there's no such property any more. | ||
1. `true`, obtido de `rabbit`. | ||
2. `null`, obtido de `animal`. | ||
3. `undefined`, essa propriedade não existe mais. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
1-js/08-prototypes/01-prototype-inheritance/3-proto-and-this/solution.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
**The answer: `rabbit`.** | ||
**A resposta: `rabbit`.** | ||
|
||
That's because `this` is an object before the dot, so `rabbit.eat()` modifies `rabbit`. | ||
Isso porque `this` é o objeto antes do ponto, então `rabbit.eat()` modifica `rabbit`. | ||
|
||
Property lookup and execution are two different things. | ||
Procurar e executar propriedades são duas coisas diferentes. | ||
|
||
The method `rabbit.eat` is first found in the prototype, then executed with `this=rabbit`. | ||
O método `rabbit.eat` primeiro é encontrado no protótipo, depois é exectado com `this=rabbit`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.