← Winnitude! Search  ·  Reader Mode (1432 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 42 LINKS

Destructuring assignment by diogoosz · Pull Request #462 · javascript-tutorial/pt.javascript.info

Repository navigation

Destructuring assignment - #462


Merged
gabifs merged 2 commits into javascript-tutorial:master from diogoosz:translate-destructuring-assignment Nov 6, 2026
Merged

Destructuring assignment #462 gabifs merged 2 commits into javascript-tutorial:master from diogoosz:translate-destructuring-assignment

Conversation

diogoosz commented Nov 4, 2026



Copy link Copy Markdown
Contributor

Tradução do artigo "Destructuring assignment" para o português, incluindo os dois exercícios.

Conforme comentado na #1 .

Translate 'Destructuring assignment' article to Portuguese cda527c

CLAassistant commented Nov 4, 2026 · edited Loading



Copy link Copy Markdown


All committers have signed the CLA.

gabifs reviewed Nov 6, 2026
View reviewed changes

gabifs left a comment



Copy link Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more .

Obrigado pela tradução, @diogoosz ! Ficou bem fluida. Gostei também da correção no Resumo (defaultValue em vez de default, que agora bate com o código). Deixei algumas sugestões pequenas, a maioria pode ser aplicada direto pelo botão de sugestão.

Comment thread 1-js/05-data-types/10-destructuring-assignment/article.md
Outdated
```

In real-life, the problem is how to remember the order of arguments. Usually, IDEs try to help us, especially if the code is well-documented, but still ... Another problem is how to call a function when most parameters are ok by default .
Na prática, o problema é como lembrar a ordem dos argumentos. Normalmente as IDEs tentam nos ajudar, principalmente se o código estiver bem documentado, mas ainda assim ... Outro problema é como chamar uma função quando a maioria dos parâmetros já está bom com o valor padrão .
Comment thread 1-js/05-data-types/10-destructuring-assignment/article.md
Outdated
// width, height - defaults used
// title, items - vêm de options,
// width, height - usam o valor padrão
alert( `${title} ${width} ${height}` ); // My Menu 200 100
Comment thread 1-js/05-data-types/10-destructuring-assignment/article.md
Outdated
items: [item1, item2] // primeiro elemento de items vai para item1, segundo para item2
}) {
*/!*
alert( `${title} ${w} ${h}` ); // My Menu 100 200
Comment thread 1-js/05-data-types/10-destructuring-assignment/article.md
Outdated
E se o objeto tiver mais propriedades do que temos variáveis? Dá pra pegar algumas e jogar "o resto" em outro lugar ?

We can use the rest pattern, just like we did with arrays. It's not supported by some older browsers (IE, use Babel to polyfill it ), but works in modern ones .
Podemos usar o padrão de resto, assim como fizemos com arrays. Ele não é suportado em alguns navegadores mais antigos (IE, use o Babel para fazer o polyfill ), mas funciona nos navegadores modernos .
Comment thread 1-js/05-data-types/10-destructuring-assignment/1-destruct-user/task.md
@@ -13,18 +13,18 @@ let user = {
};
```

Comment thread 1-js/05-data-types/10-destructuring-assignment/article.md
Outdated
@@ -1,89 +1,89 @@
# Destructuring assignment
# Atribuição via desestruturação
Apply review suggestions from gabifs 83967b3

diogoosz commented Nov 6, 2026



Copy link Copy Markdown
Contributor

Author

Obrigado pela revisão, @gabifs ! Apliquei tudo: corrigi a concordância, as duas ocorrências de "My Menu" (pra bater com o valor real "My menu"), ajustei o trecho do polyfill, e troquei "leia" por "extraia".

Sobre o termo: como 9-shuffle/solution.md já usa "atribuição de desestruturação", segui esse precedente e padronizei pra "de" em todo o artigo (título incluso). Acho que faz mais sentido manter o termo que já estava estabelecido no repo do que criar uma segunda variação.

gabifs approved these changes Nov 6, 2026
View reviewed changes
gabifs merged commit 65359f4 into javascript-tutorial : master Nov 6, 2026 1 check passed gabifs mentioned this pull request Nov 7, 2026 Portuguese Translation Progress #1 Open Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment

Labels

None yet

3 participants