Switch Statements - Beau teaches JavaScript

preview_player
Показать описание
Switch statements help control the flow of your program. This video explains how to use them in JavaScript.

Code:
More info:

⭐JavaScript Playlists⭐

-
We're busy people who learn to code, then practice by building projects for nonprofits. Learn Full-stack JavaScript, build a portfolio, and get great references with our open source community.

Рекомендации по теме
Комментарии
Автор

thank you so much Beau! love your ending tag! "use your code for good" :)

bridget
Автор

Declaring variables in JS is done using keywords such as let, const or var. That's why you see the let keyword in this example. As for why it outputs Friday (I think this is an error on the teacher side), because the Date object in JS has a method getDay which takes his Local Time and on the day of him writting this code it was Friday so it outputs it.

MarkoMajstorovic-se
Автор

i am very impressed the videos about js and especially buea teacher😍

NidaAslam-lx
Автор

Got a little lost on how you got Friday for the first example.. If someone can explain that would be great

MiguelVargas-pzzv
Автор

How does the first switch case know that it's Friday though? Does it reference some kind of global property?

CiscoZero
Автор

Can this be done with changing background colors on a webpage? If so how exactly

MilesLogan
Автор

how come when it says Case followed by a number the number is not in parentheses but when it is Case followed by a word or letter they are in parentheses?
case 1
case "a"

danielsen-Kf
Автор

thanks, I'm sick of using if statement over and over

DIZZYplys
Автор

i don't think i've ever used a switch. they're bad because you have to remember to break; just use else if

stephenkamenar
Автор

Much love Beau! Thanks for your videos

reidwilliamson
Автор

what does let day; mean?

let day what? we did not assign any value to this variable here ... Why?

syedarmaghanhassan
Автор

what is the function of case? why is it there.

EpicNarrative
Автор

Ok dinosaurs are extinct... but poor chickens :(

Gentarozzo
Автор

Always the same example given on every

nielsnet
Автор

That was a terrible discussion of switch statements;. totally confusing.

peterwoods
Автор

please avoid this channel they're terrible at explaining code with the worst examples lmao.

kmachappy
Автор

So you think that all dinosaurs were able to swim?

PhilippeRigovanov
Автор

check this for a more noob friendly video to get what happens here. cheers.

yohanjayawardena
welcome to shbcf.ru