Learn JavaScript SWITCHES in 6 minutes! 💡

  Рет қаралды 12,032

Bro Code

Bro Code

Күн бұрын

00:00:00 example 1
00:03:28 break
00:04:14 example 2

Пікірлер: 13
@BroCodez
@BroCodez 8 ай бұрын
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`); }
@user-bw5zh7mu7s
@user-bw5zh7mu7s Ай бұрын
Why did you use "const" over comment and in the video you used "let"? I am sorry i am a beginner.
@RainNebula
@RainNebula 18 күн бұрын
@@user-bw5zh7mu7s "let" is used to define a variable in JavaScript. "const" is also used to define a variable. The only difference is "const" makes a constant variable, that is one that stays constant and can't change. For the purpose of just the switch statement it doesn't really matter. However, if the switch statement had something like " case 7: day += 1; break; " then "const" wouldn't work as it cannot be changed, it stays constant at what it was initially set to. That's my understanding at least. Looking into the differences between the two can potentially give more insight.
@mehnajiktafena
@mehnajiktafena 8 ай бұрын
Dude I can't thank you enough right now❤❤❤
@djo_shorts6154
@djo_shorts6154 8 ай бұрын
Love you bro 🙌✨
@iagomartinez3019
@iagomartinez3019 5 ай бұрын
great video bro!
@fachihul
@fachihul 8 ай бұрын
Is it brand new course?
@andrediegues2740
@andrediegues2740 4 ай бұрын
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?
@marycarmenrivera7351
@marycarmenrivera7351 4 ай бұрын
You could add a case testScore > 100 with something like "score can't be over 100" for the letterscore
@andrediegues2740
@andrediegues2740 4 ай бұрын
@@marycarmenrivera7351 Thank you!
@futuredoctor7148
@futuredoctor7148 4 ай бұрын
thnx bro
@1T_pressly
@1T_pressly 8 ай бұрын
@ProgrammingMatters
@ProgrammingMatters 8 ай бұрын
🤗🤗🤗
Useful JavaScript STRING METHODS 🧵
8:03
Bro Code
Рет қаралды 12 М.
Sir Zia Repo Part 2 Practice step03_04 |Governor Sindh IT Course
47:58
Knowledge & Learning
Рет қаралды 2,6 М.
La revancha 😱
00:55
Juan De Dios Pantoja 2
Рет қаралды 68 МЛН
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 2,4 МЛН
Whyyyy? 😭 #shorts by Leisi Crazy
00:16
Leisi Crazy
Рет қаралды 20 МЛН
ROCK PAPER SCISSOR! (55 MLN SUBS!) feat @PANDAGIRLOFFICIAL #shorts
00:31
If statements in JavaScript are easy 🤔
15:58
Bro Code
Рет қаралды 23 М.
why are switch statements so HECKIN fast?
11:03
Low Level Learning
Рет қаралды 383 М.
Learn JavaScript CLOSURES in 10 minutes! 🔒
10:58
Bro Code
Рет қаралды 12 М.
STOP Using Classes In JavaScript | Prime Reacts
14:02
ThePrimeTime
Рет қаралды 221 М.
JavaScript Loops Made Easy
10:52
codeSTACKr
Рет қаралды 165 М.
Learn JavaScript KEY EVENTS in 10+ minutes! ⌨
11:16
Bro Code
Рет қаралды 15 М.
Learn DOM Manipulation In 18 Minutes
18:37
Web Dev Simplified
Рет қаралды 1 МЛН
JavaScript Loops
6:49
Programming with Mosh
Рет қаралды 409 М.
JavaScript Array Mastery: Tips, Tricks & Best Practices
1:02:49
Envato Tuts+
Рет қаралды 17 М.
La revancha 😱
00:55
Juan De Dios Pantoja 2
Рет қаралды 68 МЛН