Learn JavaScript SWITCHES in 6 minutes! 💡

preview_player
Показать описание
00:00:00 example 1
00:03:28 break
00:04:14 example 2
Рекомендации по теме
Комментарии
Автор

const day = 7;

switch (day) {
case 1:
console.log("It is Monday");
break;
case 2:
console.log("It is Tuesday");
break;
case 3:
console.log("It is Wednesday");
break;
case 4:
console.log("It is Thursday");
break;
case 5:
console.log("It is Friday");
break;
case 6:
console.log("It is Saturday");
break;
case 7:
console.log("It is Sunday");
break;
default:
console.log(`${day} is not a day`);
}

BroCodez
Автор

Dude I can't thank you enough right now❤❤❤

mehnajiktafena
Автор

<*_> This is my seal. I have watched the entire video, understood it, and I can explain it in my own words, thus I have gained knowledge. This is my seal. <_*>

piotrmazgaj
Автор

Hey, I've been watching your videos about learning code, and I find them really helpful, thank you. However, I was thinking through the example that you gave with the Grade System, and I find there's something missing there. The grades are usually from 100 to 0, so the default part of the work does not have any mistakes, but there is a maximum grade. And if I put 101 or any other superior value, it's still A, how do I put it so that it stops in 100?

andrediegues
Автор

Couldn't help myself; case 3 logs It is Wednesday, my dudes.

mathMetallica