The "switch" statement by bmatasar · Pull Request #9 · javascript-tutorial/ro.javascript.info
Repository navigation
The "switch" statement - #9
Merged
lighthousand merged 9 commits into javascript-tutorial:master from bmatasar:bmatasar-switch Jun 4, 2019
Merged
The "switch" statement #9 lighthousand merged 9 commits into javascript-tutorial:master from bmatasar:bmatasar-switch
Conversation
bmatasar commented Jun 4, 2019
Copy link Copy Markdown
Contributor
No description provided.
bmatasar added 6 commits June 4, 2019 15:16
Translated
d3bea6b
Update task.md
59c6193
Update solution.md
3b3b39a
Update task.md
6a6904a
Update solution.md
69f821e
Update article.md
60b4d9f
javascript-translate-bot
added
the
review needed
label
Jun 4, 2019
javascript-translate-bot
requested a review
from a team
June 4, 2019 12:39
lighthousand
requested changes
Jun 4, 2019
View reviewed changes
Comment thread 1-js/02-first-steps/13-switch/article.md
Outdated
|
|
||
| *!* | ||
| case 3: // (*) grouped two cases | ||
| case 3: // (*) douș cazuri grupate |
Outdated
| Acum atât `3` cât și `5` arată același mesaj . | ||
|
|
||
| The ability to "group" cases is a side-effect of how `switch/case` works without `break`. Here the execution of `case 3` starts from the line `(*)` and goes through `case 5`, because there's no `break`. | ||
| Posibilitatea de a ȚgrupaȚ cazuri este un efect secundar al modului în care funcționează `switch/case` fără `break`. Execuția blocului `case 3` începe de la linia marcată `(*)` și continuă în `case 5`, pentru că nu există niciun `break`. |
Outdated
| @@ -1,20 +1,20 @@ | ||
| To precisely match the functionality of `switch`, the `if` must use a strict comparison `'==='`. | ||
| Pentru a obține exact funcționalitatea instrucțiunii `switch`, `if` trebuie să folosească operatorul de egalitate exactă `'==='`. |
Outdated
| Observație: instrucțiunea `break` de la sfârșit nu este necesară, dar putem să o adăugăm pentru a pregăti codul pentru viitor . | ||
|
|
||
| In the future, there is a chance that we'd want to add one more `case`, for example `case 4`. And if we forget to add a break before it, at the end of `case 3`, there will be an error. So that's a kind of self-insurance . | ||
| În viitor este posibil că vom dori să mai adăugăm încă un `case`, de exemplu `case 4`. Dacă uităm să adăugăm un ` break ` înaintea lui, la sfârșitul blocului `case 3`, vom obține o eroare. Deci avem un fel de auto-asigurare . |
javascript-translate-bot commented Jun 4, 2019
Copy link Copy Markdown
|
Please make the requested changes. After it, add a comment "/done". |
Update article.md
befc1da
Update solution.md
d9fb0fa
Update solution.md
2c6a43a
bmatasar commented Jun 4, 2019
Copy link Copy Markdown
Contributor
Author
|
/done |
ef04b82
into
javascript-tutorial : master
Jun 4, 2019
iliakan
mentioned this pull request
Jun 4, 2019
Romanian Translation Progress
#1
Open
Sign up for free
to join this conversation on GitHub .
Already have an account?
Sign in to comment