Conditional branching: if, '?' by jonnathan-ls · Pull Request #246 · javascript-tutorial/pt.javascript.info
Repository navigation
Conditional branching: if, '?' - #246
Merged
nazarepiedady merged 6 commits into javascript-tutorial:master from jonnathan-ls:feature/steps-ifelse Dec 23, 2023
Merged
Conditional branching: if, '?' #246 nazarepiedady merged 6 commits into javascript-tutorial:master from jonnathan-ls:feature/steps-ifelse
Conversation
jonnathan-ls commented Jun 29, 2022 · edited Loading
Copy link Copy Markdown
Contributor
Conditional branching: if, '?'
📝 Goal
Article translation
☑ What was done?
- Translation of the article
- Translation of the exercises
- Translation of the SVG image
feat(steps): translates the article about conditional branching
2c71b37
javascript-translate-bot
added
the
review needed
label
Jun 29, 2022
javascript-translate-bot
requested a review
from a team
June 29, 2022 03:31
jonnathan-ls
changed the title
WIP: Conditional branching: if, '?'
WIP Conditional branching: if, '?'
Jun 29, 2022
jonnathan-ls commented Jun 29, 2022
Copy link Copy Markdown
Contributor
Author
|
🚧 work in progress |
Merge branch 'master' of https://github.com/jonnathan-ls/pt.javascrip...
ad77bb6
...t.info into feature/steps-ifelse
feat(first-steps): translates the images of article about conditional...
6cad86f
... branchingjonnathan-ls changed the title WIP Conditional branching: if, '?' Conditional branching: if, '?' Jul 7, 2022
jonnathan-ls commented Jul 7, 2022
Copy link Copy Markdown
Contributor
Author
|
✅ Ready for review |
View reviewed changes
odsantos 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 .
Hi, Please fell free to tell where you disagree. Thanks, Osvaldo.
Comment thread 1-js/02-first-steps/10-ifelse/1-if-zero-string/task.mdOutdated
| --- | ||
|
|
||
| # if (a string with zero) | ||
| # f (uma " string " com zero) |
Outdated
| 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!" |
Outdated
| --- | ||
|
|
||
| # Show the sign | ||
| # Mostra o sinal |
Outdated
| - `0`, if equals zero. | ||
| - `1`, se o valor for maior que zero, | ||
| - `-1`, se menor que zero, | ||
| - `0`, se for igual a zero. |
| # 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 . |
Outdated
| 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. |
Outdated
|
|
||
| ```js run no-beautify | ||
| let company = prompt(' Which company created JavaScript?', ''); | ||
| let company = prompt(' Qual empresa criou o JavaScript?', ''); |
Outdated
| ** 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 . |
Outdated
|
|
||
| ```js run no-beautify | ||
| let company = prompt(' Which company created JavaScript?', ''); | ||
| let company = prompt(' Qual empresa criou o JavaScript?', ''); |
| 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 . |
javascript-translate-bot commented Dec 6, 2022
Copy link Copy Markdown
|
Please make the requested changes. After it, add a comment "/done". |
odsantos commented Dec 16, 2022
Copy link Copy Markdown
Contributor
|
Hi @jonnathan-ls , I updated to the English version. Thanks, |
Merge branch 'master' of https://github.com/jonnathan-ls/pt.javascrip...
203e90c
...t.info into feature/steps-ifelse
refactor: corrige sugestões conforme code review #pullrequestreview-1...
f38a7d5
...207296036 Code Review: javascript-tutorial#246 (review)
jonnathan-ls commented Mar 26, 2023
Copy link Copy Markdown
Contributor
Author
@odsantos conflitos resolvidos. |
jonnathan-ls commented Mar 26, 2023 · edited Loading
Copy link Copy Markdown
Contributor
Author
@odsantos Apenas algumas sugestões relacionadas a preposição "de", pois entendo que fica um pouco estranho para o leitor. |
jonnathan-ls commented Apr 2, 2023
Copy link Copy Markdown
Contributor
Author
|
/done |
nazarepiedady commented Dec 15, 2023
Copy link Copy Markdown
Member
|
@jonnathan-ls have you time to update this translation and correct its conflicts? |
jonnathan-ls commented Dec 15, 2023
Copy link Copy Markdown
Contributor
Author
Sure, I'll do it on the weekend |
nazarepiedady commented Dec 15, 2023
Copy link Copy Markdown
Member
|
@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. |
Merge branch 'master' of https://github.com/javascript-tutorial/pt.ja...
2f76d90
...vascript.info into feature/steps-ifelse
jonnathan-ls commented Dec 16, 2023
Copy link Copy Markdown
Contributor
Author
|
Conflicts resolved @nazarepiedady @odsantos awaiting analysis of the corrections I made according to your review |
nazarepiedady commented Dec 23, 2023
Copy link Copy Markdown
Member
|
@jonnathan-ls Are all reviews requested by @odsantos resolved? |
jonnathan-ls commented Dec 23, 2023
Copy link Copy Markdown
Contributor
Author
Yes, i am waiting his to review again |
jonnathan-ls commented Dec 23, 2023
Copy link Copy Markdown
Contributor
Author
|
/done |
a1de0f9
into
javascript-tutorial : master
Dec 23, 2023
javascript-translate-bot commented Dec 23, 2023
Copy link Copy Markdown
|
Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉 |