File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
1-js/02-first-steps/10-ifelse/6-rewrite-if-else-question Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 1- importance : 5
1+ маанилүүлүк : 5
22
33---
44
5- # Rewrite 'if..else' into '?'
5+ # 'if..else' дегенди '?' дегенге кайрадан жазыңыз
66
7- Rewrite ` if..else ` using multiple ternary operators ` '?' ` .
7+ Бир нече тернарлык операторлорун ` '?' ` колдонуп, ` if..else ` түзүлүшүн кайра жазыңыз .
88
9- For readability, it's recommended to split the code into multiple lines .
9+ Окууга ыңгайлуу болуу үчүн кодду бир нече сапка бөлүүгө сунушталат .
1010
1111``` js
1212let message;
1313
14- if (login == ' Employee ' ) {
15- message = ' Hello ' ;
16- } else if (login == ' Director ' ) {
17- message = ' Greetings ' ;
14+ if (login == ' Кызматчы ' ) {
15+ message = ' Салам ' ;
16+ } else if (login == ' Мүдүр ' ) {
17+ message = ' Саламатсызбы ' ;
1818} else if (login == ' ' ) {
19- message = ' No login ' ;
19+ message = ' Логин жок ' ;
2020} else {
2121 message = ' ' ;
2222}
You can’t perform that action at this time.
0 commit comments