GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Conditional branching: if, '?' by jonnathan-ls · Pull Request #246 · javascript-tutorial/pt.javascript.info Conversation
|
|
🚧 work in progress |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…t.info into feature/steps-ifelse
|
✅ Ready for review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Hi, Please fell free to tell where you disagree. Thanks, Osvaldo.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| --- | ||
|
|
||
| # if (a string with zero) | ||
| # f (uma “string” com zero) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| # f (uma “string” com zero) | |
| # if (uma “string” com zero) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Usando a construção `if..else`, escreva o código que pergunta: 'Qual é o nome "oficial" do JavaScript?' | ||
|
|
||
| If the visitor enters "ECMAScript", then output "Right!", otherwise -- output: "You don't know? ECMAScript!" | ||
| Se o visitante digitar "ECMAScript", então chame a função alerta passando como valor: "correto!", caso contrário -- registre a seguinte mensagem: "Você não sabe? ECMAScript!" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| Se o visitante digitar "ECMAScript", então chame a função alerta passando como valor: "correto!", caso contrário -- registre a seguinte mensagem: "Você não sabe? ECMAScript!" | |
| Se o visitante digitar "ECMAScript", então chame a função `alert` passando como valor: "Correto!", caso contrário -- registre a seguinte mensagem: "Você não sabe? ECMAScript!" |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| --- | ||
|
|
||
| # Show the sign | ||
| # Mostra o sinal |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| # Mostra o sinal | |
| # Mostre o sinal |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| - `0`, if equals zero. | ||
| - `1`, se o valor for maior que zero, | ||
| - `-1`, se menor que zero, | ||
| - `0`, se for igual a zero. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| - `0`, se for igual a zero. | |
| - `0`, se igual a zero. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # Ramificação condicional: if, '?' | ||
|
|
||
| Sometimes, we need to perform different actions based on different conditions. | ||
| Às vezes, precisamos realizar ações diferentes com base em condições diferentes. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| Às vezes, precisamos realizar ações diferentes com base em condições diferentes. | |
| Às vezes, precisamos de realizar ações diferentes com base em condições diferentes. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| The so-called "conditional" or "question mark" operator lets us do that in a shorter and simpler way. | ||
| O chamado operador "condicional" ou "ponto de interrogação" nos permite fazer isso de uma forma curta e simples. | ||
|
|
||
| O operador é representado por um ponto de interrogação `?`. Às vezes referênciado como "ternário", porque o operador possui três operandos. Na verdade, é o único operador em JavaScript que possui tantos. Na verdade, é o único operador em JavaScript que possui tantas possibilidades de operandos. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| O operador é representado por um ponto de interrogação `?`. Às vezes referênciado como "ternário", porque o operador possui três operandos. Na verdade, é o único operador em JavaScript que possui tantos. Na verdade, é o único operador em JavaScript que possui tantas possibilidades de operandos. | |
| O operador é representado por um ponto de interrogação `?`. Às vezes é chamado de "ternário", porque o operador possui três operandos. Na verdade, é o único operador em JavaScript que possui tantos. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| ```js run no-beautify | ||
| let company = prompt('Which company created JavaScript?', ''); | ||
| let company = prompt('Qual empresa criou o JavaScript?', ''); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| let company = prompt('Qual empresa criou o JavaScript?', ''); | |
| let company = prompt('Que empresa criou o JavaScript?', ''); |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| **Não é recomendado usar o operador de ponto de interrogação dessa maneira.** | ||
|
|
||
| The notation is shorter than the equivalent `if` statement, which appeals to some programmers. But it is less readable. | ||
| A notação é mais curta do que a instrução `if` equivalente, que atrai alguns programadores. Mas é menos legível. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| A notação é mais curta do que a instrução `if` equivalente, que atrai alguns programadores. Mas é menos legível. | |
| A notação é mais curta do que a instrução `if` equivalente, o que atrai alguns programadores. Mas é menos legível. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| ```js run no-beautify | ||
| let company = prompt('Which company created JavaScript?', ''); | ||
| let company = prompt('Qual empresa criou o JavaScript?', ''); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| let company = prompt('Qual empresa criou o JavaScript?', ''); | |
| let company = prompt('Que empresa criou o JavaScript?', ''); |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Nossos olhos escaneiam o código verticalmente. Blocos de código que abrangem várias linhas são mais fáceis de entender do que um conjunto de instruções longo e horizontal. | ||
|
|
||
| The purpose of the question mark operator `?` is to return one value or another depending on its condition. Please use it for exactly that. Use `if` when you need to execute different branches of code. | ||
| O objetivo do operador de ponto de interrogação `?` é retornar um valor ou outro dependendo de sua condição. Por favor, use-o exatamente para isso. Use `if` quando precisar executar diferentes ramificações de código. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| O objetivo do operador de ponto de interrogação `?` é retornar um valor ou outro dependendo de sua condição. Por favor, use-o exatamente para isso. Use `if` quando precisar executar diferentes ramificações de código. | |
| O objetivo do operador de ponto de interrogação `?` é retornar um valor ou outro dependendo de sua condição. Por favor, use-o exatamente para isso. Use `if` quando precisar de executar diferentes ramificações de código. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Semelhante a https://github.com/javascript-tutorial/pt.javascript.info/pull/246/files#r1148666022
Sem a preposição fica o mais próximo da tradução literal:
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Please make the requested changes. After it, add a comment "/done". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hi @jonnathan-ls , I updated to the English version. Thanks, |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…t.info into feature/steps-ifelse
@odsantos conflitos resolvidos. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
@odsantos Apenas algumas sugestões relacionadas a preposição "de", pois entendo que fica um pouco estranho para o leitor. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
/done |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@jonnathan-ls have you time to update this translation and correct its conflicts? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sure, I'll do it on the weekend |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@jonnathan-ls I also recommend looking at all your pull requests to see what more needs to be done to let the pull request fine be applied. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…vascript.info into feature/steps-ifelse
|
Conflicts resolved @nazarepiedady @odsantos awaiting analysis of the corrections I made according to your review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@jonnathan-ls Are all reviews requested by @odsantos resolved? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Yes, i am waiting his to review again |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
/done |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.