Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 114
Prototypal inheritance#230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
cdfbd74ba63e6eaf54f5adf77cc5ad9565b8421ec7b9f7d08639b458cf5852a2e70145b1febcec574482367c032768e03fb0ee5f64cccda89bb0f1bf619d4a8ae513a584d0cdb2076f8b2fd68a9a934795413d857c49cf7c7201ce19f7f94File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| 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. | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Traduzir as variáveis |
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Traduzir o código |
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Traduzir o código |
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Traduzir as variáveis |
| 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`. |
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Traduzir o código |
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Traduzir o código |
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Traduzir o código |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.