split hello-world into 2 chapters
This commit is contained in:
parent
99240a757a
commit
97daf5f54a
117 changed files with 177 additions and 177 deletions
|
@ -0,0 +1,22 @@
|
|||
# Перепишите 'if..else' в '?'
|
||||
|
||||
[importance 5]
|
||||
|
||||
Перепишите `if..else` с использованием нескольких операторов `'?'`.
|
||||
|
||||
Для читаемости -- оформляйте код в несколько строк.
|
||||
|
||||
```js
|
||||
var message;
|
||||
|
||||
if (login == 'Вася') {
|
||||
message = 'Привет';
|
||||
} else if (login == 'Директор') {
|
||||
message = 'Здравствуйте';
|
||||
} else if (login == '') {
|
||||
message = 'Нет логина';
|
||||
} else {
|
||||
message = '';
|
||||
}
|
||||
```
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue