GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Function object, NFE by diogoosz · Pull Request #481 · javascript-tutorial/pt.javascript.info

Conversation

@diogoosz

@diogoosz 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@diogoosz @claude
Translate "Function object, NFE" article to Portuguese
77a6a55
Co-Authored-By: Claude Sonnet 5 <[email protected]>
gabifs
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/06-advanced-functions/06-function-object/5-sum-many-brackets/solution.md
```

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.

@gabifs gabifs Nov 12, 2026

Copy link
Copy Markdown
Contributor

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.

Concordância de gênero inconsistente: "Esse f será usado" (masc.) e "quando usado" vs "retornando a si mesma" (fem.). Sugestão: "Essa f será usada na próxima chamada, de novo retornando a si mesma... quando usada como um número" — ou manter tudo no masculino ("retornando a si mesmo").

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
gabifs
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/06-advanced-functions/06-function-object/article.md
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.

@gabifs gabifs Nov 12, 2026

Copy link
Copy Markdown
Contributor

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.

Norma culta: não se contrai preposição com artigo do sujeito de infinitivo. Sugestão: "a forma de a função chamar a si mesma de forma confiável" (ou "o modo pelo qual a função chama a si mesma de forma confiável").

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
gabifs
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/06-advanced-functions/06-function-object/article.md
sayHi(); // Hi

alert( `Called ${sayHi.counter} times` ); // Called 2 times
alert( `Chamada ${sayHi.counter} vezes` ); // Chamada 2 vezes

@gabifs gabifs Nov 12, 2026

Copy link
Copy Markdown
Contributor

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.

Aqui a string do alert foi traduzida ("Chamada ... vezes"), mas as demais strings de código do artigo seguem em inglês ("Hi", "Hello, John", "Guest", "Question?", "You said yes"). Sugiro escolher um critério e aplicá-lo de forma consistente no artigo.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
gabifs
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/06-advanced-functions/06-function-object/article.md
```

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:

@gabifs gabifs Nov 12, 2026

Copy link
Copy Markdown
Contributor

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.

Tradução literal soa estranha: "O que é meio engraçado, a lógica...". Sugestão: "Curiosamente, a lógica de atribuição do nome é esperta."

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
gabifs
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/06-advanced-functions/06-function-object/2-counter-inc-dec/_js.view/test.js
assert.equal( counter(), 0 );
assert.equal( counter(), 1 );
assert.equal( counter(), 2 );
assert.equal( counter(), 0 );

@gabifs gabifs Nov 12, 2026

Copy link
Copy Markdown
Contributor

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.

Mudanças só de whitespace (remoção de espaços no fim das linhas) neste arquivo não fazem parte da tradução e aumentam a divergência com o upstream (en.javascript.info), gerando conflitos desnecessários em syncs futuros. Sugiro reverter essas linhas e manter só a tradução dos it(...).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gabifs gabifs mentioned this pull request Nov 12, 2026
Portuguese Translation Progress #1
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gabifs gabifs gabifs left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@diogoosz @gabifs
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.