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

Arrays by diogoosz · Pull Request #479 · javascript-tutorial/pt.javascript.info

Repository navigation

Arrays - #479


Merged
gabifs merged 2 commits into javascript-tutorial:master from diogoosz:translate-arrays Nov 21, 2026
Merged

Arrays #479 gabifs merged 2 commits into javascript-tutorial:master from diogoosz:translate-arrays

Conversation

diogoosz commented Nov 8, 2026



Copy link Copy Markdown
Contributor

Tradução do artigo "Arrays" para o português, incluindo os exercícios e as imagens array-pop.svg e array-shift.svg.

Conforme comentado na #1 .

Translate "Arrays" article to Portuguese 9e4ac41
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/05-data-types/04-array/article.md
Outdated
O mesmo vale para o método `push`.

## Loops
## Laços
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/05-data-types/04-array/article.md
Outdated
## Não compare arrays com ==

Arrays in JavaScript, unlike some other programming languages, shouldn't be compared with operator `==`.
Arrays no JavaScript, diferente de outras linguagens de programação, não devem ser comparados com o operador `==`.
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/05-data-types/04-array/array-pop.svg
@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="479" height="148" viewBox="0 0 479 148"><defs><style>@import url(https://fonts.googleapis.com/css?family=Open+Sans:bold,italic,bolditalic%7CPT+Mono);@font-face{font-family:&apos;PT Mono&apos;;font-weight:700;font-style:normal;src:local(&apos;PT MonoBold&apos;),url(/font/PTMonoBold.woff2) format(&apos;woff2&apos;),url(/font/PTMonoBold.woff) format(&apos;woff&apos;),url(/font/PTMonoBold.ttf) format(&apos;truetype&apos;)}</style></defs><g id="array" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="array-pop.svg"><path id="Rectangle-1" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" d="M103 82h35v52h-35z"/><path id="Rectangle-2" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" d="M139 82h35v52h-35z"/><text id="0" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="117" y="112">0</tspan></text><text id="1" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="154" y="112">1</tspan></text><path id="Rectangle-3" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" d="M175 82h35v52h-35z"/><text id="2" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="190" y="112">2</tspan></text><path id="Rectangle-4" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" d="M211 82h35v52h-35z"/><text id="3" fill="#C06334" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="226" y="112">3</tspan></text><text id="&quot;Apple&quot;" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal" transform="rotate(-89 114.044 48.948)"><tspan x="84.544" y="53.448">&quot;Apple&quot;</tspan></text><text id="&quot;Orange&quot;" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal" transform="rotate(-89 151.053 44.448)"><tspan x="117.053" y="48.948">&quot;Orange&quot;</tspan></text><text id="&quot;Pear&quot;" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal" transform="rotate(-89 187.535 52.448)"><tspan x="162.035" y="56.948">&quot;Pear&quot;</tspan></text><text id="&quot;Lemon&quot;" fill="#C06334" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal" transform="rotate(-89 229.044 48.948)"><tspan x="199.544" y="53.448">&quot;Lemon&quot;</tspan></text><text id="length-=-4" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="8" y="59">length = 4</tspan></text><path id="Shape" fill="#C06334" d="M306 137l9-16.606h-6V78h-6v42.394h-6z" transform="rotate(-90 306 107.5)"/><text id="clear" fill="#C06334" font-family="OpenSans-Regular, Open Sans" font-size="14" font-weight="normal"><tspan x="287" y="96">clear</tspan></text><path id="Rectangle-7" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" d="M363 82h35v52h-35z"/><path id="Rectangle-5" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" d="M399 82h35v52h-35z"/><text id="-1" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="377" y="112">0</tspan></text><text id="-2" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="414" y="112">1</tspan></text><path id="Rectangle-6" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" d="M435 82h35v52h-35z"/><text id="-3" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="450" y="112">2</tspan></text><text id="&quot;Apple&quot;" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal" transform="rotate(-89 374.044 48.948)"><tspan x="344.544" y="53.448">&quot;Apple&quot;</tspan></text><text id="&quot;Orange&quot;" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal" transform="rotate(-89 411.053 44.448)"><tspan x="377.053" y="48.948">&quot;Orange&quot;</tspan></text><text id="&quot;Pear&quot;" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal" transform="rotate(-89 447.535 52.448)"><tspan x="422.035" y="56.948">&quot;Pear&quot;</tspan></text><text id="length-=-3" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="263" y="59">length = 3</tspan></text></g></g></svg> No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="479" height="148" viewBox="0 0 479 148"><defs><style>@import url(https://fonts.googleapis.com/css?family=Open+Sans:bold,italic,bolditalic%7CPT+Mono);@font-face{font-family:&apos;PT Mono&apos;;font-weight:700;font-style:normal;src:local(&apos;PT MonoBold&apos;),url(/font/PTMonoBold.woff2) format(&apos;woff2&apos;),url(/font/PTMonoBold.woff) format(&apos;woff&apos;),url(/font/PTMonoBold.ttf) format(&apos;truetype&apos;)}</style></defs><g id="array" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="array-pop.svg"><path id="Rectangle-1" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" d="M103 82h35v52h-35z"/><path id="Rectangle-2" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" d="M139 82h35v52h-35z"/><text id="0" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="117" y="112">0</tspan></text><text id="1" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="154" y="112">1</tspan></text><path id="Rectangle-3" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" d="M175 82h35v52h-35z"/><text id="2" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="190" y="112">2</tspan></text><path id="Rectangle-4" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" d="M211 82h35v52h-35z"/><text id="3" fill="#C06334" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="226" y="112">3</tspan></text><text id="&quot;Apple&quot;" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal" transform="rotate(-89 114.044 48.948)"><tspan x="84.544" y="53.448">&quot;Apple&quot;</tspan></text><text id="&quot;Orange&quot;" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal" transform="rotate(-89 151.053 44.448)"><tspan x="117.053" y="48.948">&quot;Orange&quot;</tspan></text><text id="&quot;Pear&quot;" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal" transform="rotate(-89 187.535 52.448)"><tspan x="162.035" y="56.948">&quot;Pear&quot;</tspan></text><text id="&quot;Lemon&quot;" fill="#C06334" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal" transform="rotate(-89 229.044 48.948)"><tspan x="199.544" y="53.448">&quot;Lemon&quot;</tspan></text><text id="length-=-4" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="8" y="59">length = 4</tspan></text><path id="Shape" fill="#C06334" d="M306 137l9-16.606h-6V78h-6v42.394h-6z" transform="rotate(-90 306 107.5)"/><text id="clear" fill="#C06334" font-family="OpenSans-Regular, Open Sans" font-size="14" font-weight="normal"><tspan x="281.5" y="96">limpar</tspan></text><path id="Rectangle-7" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" d="M363 82h35v52h-35z"/><path id="Rectangle-5" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" d="M399 82h35v52h-35z"/><text id="-1" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="377" y="112">0</tspan></text><text id="-2" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="414" y="112">1</tspan></text><path id="Rectangle-6" fill="#FBF2EC" stroke="#DBAF88" stroke-width="2" d="M435 82h35v52h-35z"/><text id="-3" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="450" y="112">2</tspan></text><text id="&quot;Apple&quot;" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal" transform="rotate(-89 374.044 48.948)"><tspan x="344.544" y="53.448">&quot;Apple&quot;</tspan></text><text id="&quot;Orange&quot;" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal" transform="rotate(-89 411.053 44.448)"><tspan x="377.053" y="48.948">&quot;Orange&quot;</tspan></text><text id="&quot;Pear&quot;" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal" transform="rotate(-89 447.535 52.448)"><tspan x="422.035" y="56.948">&quot;Pear&quot;</tspan></text><text id="length-=-3" fill="#AF6E24" font-family="PTMono-Regular, PT Mono" font-size="14" font-weight="normal"><tspan x="263" y="59">length = 3</tspan></text></g></g></svg> No newline at end of file
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/05-data-types/04-array/10-maximal-subarray/solution.md
Outdated
# Solução lenta

We can calculate all possible subsums .
Podemos calcular todas as somas parciais possíveis .
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/05-data-types/04-array/article.md
Outdated

arr.length = 5; // return length back
alert( arr[3] ); // undefined: the values do not return
arr.length = 5; // retorna o length de volta
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/05-data-types/04-array/article.md
## Métodos pop/push, shift/unshift

A [queue ](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)) is one of the most common uses of an array. In computer science, this means an ordered collection of elements which supports two operations :
Uma [fila ](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)) é um dos usos mais comuns de um array. Em ciência da computação, isso significa uma coleção ordenada de elementos que suporta duas operações :
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/05-data-types/04-array/5-array-input-sum/solution.md
Outdated
@@ -1,4 +1,4 @@
Please note the subtle, but important detail of the solution. We don't convert `value` to number instantly after `prompt`, because after `value = +value` we would not be able to tell an empty string (stop sign) from the zero ( valid number ). We do it later instead .
Observe o detalhe sutil, mas importante, da solução. Não convertemos `value` para número logo depois do `prompt`, porque depois de `value = +value` não conseguiríamos mais distinguir uma string vazia (sinal de parada) do zero ( número válido ). Fazemos isso mais tarde, em vez disso .
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/05-data-types/04-array/article.md
Outdated
- Fill the array in the reverse order, like `arr[1000]`, `arr[999]` and so on .
- Adicionar uma propriedade não numérica, como `arr.test = 5`.
- Criar buracos, tipo: adicionar `arr[0]` e depois `arr[1000]` ( e nada entre eles ).
- Preencher o array na ordem reversa, tipo `arr[1000]`, `arr[999]` e assim por diante .
gabifs mentioned this pull request Nov 12, 2026 Portuguese Translation Progress #1 Open Apply review feedback from @gabifs 377daa2
- Revert the hand-edited array-pop.svg/array-shift.svg back to the
  original and regenerate them from images.yml via the gulp
  translation pipeline instead, per the project's standing rule of
  never hand-editing SVGs; verified visually that both render
  correctly
- Add explicit anchor [#loops] to "## Laços" so the existing
  <info:array#loops> link from 02-first-steps/13-while-for keeps
  working
- Fix dropped qualifier: "diferente de outras linguagens" (implies
  ALL others compare by value) -> "diferente de algumas outras
  linguagens"
- Fix misleading comment: "retorna o length de volta" (sounds like
  it returns something) -> "restaura o length original"
- Standardize informal "tipo" -> "como" (2 occurrences)
- Standardize "somas parciais" -> "subsomas" in
  10-maximal-subarray/solution.md to match the term used in
  _js.view/test.js, avoiding confusion with "soma parcial" (the
  `partialSum` accumulator, a different concept covered later in the
  same file)
- Fix dangling "mais tarde, em vez disso" -> "em vez disso, fazemos
  isso mais tarde"

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

diogoosz commented Nov 21, 2026



Copy link Copy Markdown
Contributor

Author

Obrigado, @gabifs ! Peço desculpas pela reincidência nos SVGs editados à mão -- revertidos array-pop.svg e array-shift.svg para o original e regenerados via pipeline (images.yml + gulp), conferidos visualmente. Também corrigi: adicionei a âncora [#loops] pra não quebrar o link de 13-while-for, "diferente de outras linguagens"→"diferente de algumas outras linguagens", "retorna o length de volta"→"restaura o length original", "tipo"→"como", "somas parciais"→"subsomas" (consistente com o test.js), e a frase truncada no 5-array-input-sum. Sobre o link da fila: procurei um artigo equivalente em pt.wikipedia.org e não encontrei um bom (só "Fila de prioridade", que é outro conceito, e "Fila de mensagens"), então mantive o link em inglês deliberadamente.

gabifs merged commit 5fa4fe6 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

Labels

None yet

2 participants