Skip to content

Commit

Permalink
update(JS): web/javascript/reference/statements/switch
Browse files Browse the repository at this point in the history
  • Loading branch information
undead404 authored and AdriandeCita committed Sep 8, 2022
1 parent 99cc3be commit ddfdc9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions files/uk/web/javascript/reference/statements/switch/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ switch (foo) {

Пункти `case` і `default` подібні до [міток](/uk/docs/Web/JavaScript/Reference/Statements/label): вони вказують місця, куди контроль плину виконання може перестрибнути. Проте вони не створюють самі по собі лексичних [областей видимості](/uk/docs/Glossary/Scope) (так само як не виконують автоматично виходу – як показано вище). Наприклад:

```js
```js example-bad
const action = 'say_hello';
switch (action) {
case 'say_hello':
Expand Down Expand Up @@ -163,7 +163,7 @@ switch (expr) {
console.log('Манго та папайя — по $2.79 за кіло.');
break;
default:
console.log('Вибачте, у нас закінчились ' + expr + '.');
console.log(`Вибачте, у нас закінчились ${expr}.`);
}

console.log('Чи є щось іще, що ми могли б вам запропонувати?');
Expand Down

0 comments on commit ddfdc9b

Please sign in to comment.