File tree Expand file tree Collapse file tree
1-js/02-first-steps/13-switch/1-rewrite-switch-if-else Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- importance : 5
1+ importancia : 5
22
33---
44
5- # Rewrite the "switch" into an "if"
5+ # Reescribe el "switch" en un "if"
66
7- Write the code using ` if..else ` which would correspond to the following ` switch ` :
7+ Escribe el código utilizando ` if..else ` que corresponda al siguiente ` switch ` :
88
99``` js
10- switch (browser ) {
10+ switch (navegador ) {
1111 case ' Edge' :
12- alert ( " You've got the Edge!" );
12+ alert ( " ¡Tienes Edge!" );
1313 break ;
1414
1515 case ' Chrome' :
1616 case ' Firefox' :
1717 case ' Safari' :
1818 case ' Opera' :
19- alert ( ' Okay we support these browsers too ' );
19+ alert ( ' Esta bien, soportamos estos navegadores también ' );
2020 break ;
2121
2222 default :
23- alert ( ' We hope that this page looks ok !' );
23+ alert ( ' ¡Esperamos que esta página se vea bien !' );
2424}
2525```
2626
You can’t perform that action at this time.
0 commit comments