lesson 22.1 switch | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

lesson 22.1 switch

Hi, can you please tell my, how code should look like to work with this switch formula? I've just started to learn JS and have no IT background at all... function main() { var day_of_week = parseInt(readLine(), 10); switch (day_of_week) { case 1: case 2: case 3: case 4: case 5: document.write("Working Days"); break case 6: document.write("Saturday"); break default: document.write("Today is Sunday"); break; } console.log(1);

30th Aug 2021, 10:21 AM
Pawel
2 ответов
+ 4
Is this a code practice or you're just trying? Can you elaborate more on that please?
30th Aug 2021, 12:02 PM
Simba
Simba - avatar