Function object, NFE by diogoosz · Pull Request #481 · javascript-tutorial/pt.javascript.info
Repository navigation
Function object, NFE - #481
Merged
gabifs merged 2 commits into javascript-tutorial:master from diogoosz:translate-function-object Nov 21, 2026
Merged
Function object, NFE #481 gabifs merged 2 commits into javascript-tutorial:master from diogoosz:translate-function-object
Conversation
diogoosz commented Nov 8, 2026
Copy link Copy Markdown
Contributor
Tradução do artigo "Function object, NFE" para o português, incluindo os exercícios.
Conforme comentado na #1 .
Translate "Function object, NFE" article to Portuguese
77a6a55
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/06-advanced-functions/06-function-object/5-sum-many-brackets/solution.md
Outdated
| ``` | ||
|
|
||
| This `f` will be used in the next call, again return itself, as many times as needed. Then, when used as a number or a string -- the `toString` returns the `currentSum`. We could also use `Symbol.toPrimitive` or `valueOf` here for the conversion . | ||
| Esse `f` será usado na próxima chamada, de novo retornando a si mesma, quantas vezes forem necessárias. Então, quando usado como um número ou uma string -- o `toString` retorna o `currentSum`. Também poderíamos usar `Symbol.toPrimitive` ou `valueOf` aqui para a conversão . |
View reviewed changes
Comment thread 1-js/06-advanced-functions/06-function-object/article.md
Outdated
| Agora funciona, porque o nome `"func"` é local à função. Ele não é pego de fora (e nem é visível lá fora ). A especificação garante que ele sempre vai referenciar a função atual . | ||
|
|
||
| The outer code still has its variable `sayHi` or `welcome`. And `func` is an "internal function name ", the way for the function to call itself reliably . | ||
| O código externo ainda tem sua variável `sayHi` ou `welcome`. E `func` é um "nome interno de função ", a forma da função chamar a si mesma de forma confiável . |
View reviewed changes
Comment thread 1-js/06-advanced-functions/06-function-object/article.md
Outdated
| sayHi(); // Hi | ||
|
|
||
| alert( ` Called ${sayHi.counter} times ` ); // Called 2 times | ||
| alert( ` Chamada ${sayHi.counter} vezes ` ); // Chamada 2 vezes |
View reviewed changes
Comment thread 1-js/06-advanced-functions/06-function-object/article.md
Outdated
| ``` | ||
|
|
||
| What's kind of funny, the name-assigning logic is smart. It also assigns the correct name to a function even if it's created without one, and then immediately assigned : | ||
| O que é meio engraçado, a lógica de atribuição do nome é esperta. Ela também atribui o nome correto a uma função mesmo quando ela é criada sem um nome, e depois imediatamente atribuída : |
View reviewed changes
Comment thread 1-js/06-advanced-functions/06-function-object/2-counter-inc-dec/_js.view/test.js
Outdated
| assert.equal( counter(), 0 ); | ||
| assert.equal( counter(), 1 ); | ||
| assert.equal( counter(), 2 ); | ||
| assert.equal( counter(), 0 ); |
Apply review feedback from @gabifs
667db5f
- Fix gender agreement: "Esse f... retornando a si mesma... quando
usado" -> all masculine ("a si mesmo"), matching "Esse f"
- "A forma da função chamar a si mesma" -> "a forma de a função
chamar a si mesma" (preposition doesn't contract with the article
of an infinitive's subject)
- "O que é meio engraçado" -> "Curiosamente" (overly literal
translation)
- Revert the one translated demo string ("Chamada N vezes") back to
English to match every other demo string in the article ("Hi",
"Hello, John", etc.), which stay untranslated
- Revert whitespace-only changes in 2-counter-inc-dec/_js.view/test.js
(trailing spaces, blank lines, final newline) that aren't part of
the translation and only add noise against upstream; kept the
it(...) string translations
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
diogoosz commented Nov 21, 2026
Copy link Copy Markdown
Contributor
Author
|
Obrigado, @gabifs ! Apliquei tudo: corrigi a concordância de gênero (tudo no masculino, combinando com "Esse f"), corrigi a contração indevida de preposição com artigo antes de infinitivo, "O que é meio engraçado"→"Curiosamente", revertido o |
538ef66
into
javascript-tutorial : master
Nov 21, 2026
1 check passed
Sign up for free
to join this conversation on GitHub .
Already have an account?
Sign in to comment