Skip to content

The "switch" statement #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 4, 2019

Conversation

bmatasar
Copy link
Contributor

@bmatasar bmatasar commented Jun 4, 2019

No description provided.

break;

*!*
case 3: // (*) grouped two cases
case 3: // (*) douș cazuri grupate
Copy link
Member

Choose a reason for hiding this comment

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

Typo : "douș"
Possible fix : "două"


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`.
Copy link
Member

Choose a reason for hiding this comment

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

Typo : "...de a ȚgrupaȚ..."

Possible fix : '...de a"grupa"...'

@@ -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ă `'==='`.
Copy link
Member

Choose a reason for hiding this comment

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

Technical typo : "...egalitate exactă"

Possible fix : "...egalitate strictă"


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.
Copy link
Member

@lighthousand lighthousand Jun 4, 2019

Choose a reason for hiding this comment

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

Optional suggestion for grammar :

if can be done transform this : "...este posibil că vom dori...."

into this : "...este posibil să dorim...."
"...este posibil să vrem...."

@javascript-translate-bot

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

@bmatasar
Copy link
Contributor Author

bmatasar commented Jun 4, 2019

/done

@javascript-translate-bot javascript-translate-bot requested a review from a team June 4, 2019 13:27
@lighthousand lighthousand merged commit ef04b82 into javascript-tutorial:master Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants