Skip to content

Commit 69f821e

Browse files
authored
Update solution.md
1 parent 6a6904a commit 69f821e

File tree

1 file changed

+3
-3
lines changed
  • 1-js/02-first-steps/13-switch/2-rewrite-if-switch

1 file changed

+3
-3
lines changed

1-js/02-first-steps/13-switch/2-rewrite-if-switch/solution.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The first two checks turn into two `case`. The third check is split into two cases:
1+
Primele două verificări sunt transformate în două blocuri `case`. Al treilea test este împărțit în două cazuri:
22

33
```js run
44
let a = +prompt('a?', '');
@@ -21,6 +21,6 @@ switch (a) {
2121
}
2222
```
2323

24-
Please note: the `break` at the bottom is not required. But we put it to make the code future-proof.
24+
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.
2525

26-
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.
26+
Î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.

0 commit comments

Comments
 (0)