Skip to content

Commit 3b3b39a

Browse files
authored
Update solution.md
1 parent 59c6193 commit 3b3b39a

File tree

1 file changed

+7
-7
lines changed
  • 1-js/02-first-steps/13-switch/1-rewrite-switch-if-else

1 file changed

+7
-7
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
To precisely match the functionality of `switch`, the `if` must use a strict comparison `'==='`.
1+
Pentru a obține exact funcționalitatea instrucțiunii `switch`, `if` trebuie să folosească operatorul de egalitate exactă `'==='`.
22

3-
For given strings though, a simple `'=='` works too.
3+
Pentru șirurile date, merge și egalitatea simplă `'=='`.
44

55
```js no-beautify
66
if(browser == 'Edge') {
7-
alert("You've got the Edge!");
7+
alert("Folosiți Edge!");
88
} else if (browser == 'Chrome'
99
|| browser == 'Firefox'
1010
|| browser == 'Safari'
1111
|| browser == 'Opera') {
12-
alert( 'Okay we support these browsers too' );
12+
alert( 'OK, suportăm și aceste browsere' );
1313
} else {
14-
alert( 'We hope that this page looks ok!' );
14+
alert( 'Sperăm că această pagină arată bine!' );
1515
}
1616
```
1717

18-
Please note: the construct `browser == 'Chrome' || browser == 'Firefox' …` is split into multiple lines for better readability.
18+
Observație: expresia `browser == 'Chrome' || browser == 'Firefox' …` este împărțită pe mai multe linii pentru a îmbunătăți lizibilitatea.
1919

20-
But the `switch` construct is still cleaner and more descriptive.
20+
Totuși, construcția care folosește `switch` este mai curată și mai descriptivă.

0 commit comments

Comments
 (0)