Javascript Switch Statement

Опубликовано: 04 Октябрь 2024
на канале: Chris Walker (technoblogical)
2,505
17

Learn how to create a JavaScript Switch statement with this video tutorial. I create a simple script that adds a banner to the top of a webpage that shows a holiday greeting. I use static holidays like Christmas and Thanksgiving, and show how to plan for dates that move around like Thanksgiving. All of these require using a Date object and a few of the functions there.

It's a long demonstration, but a switch statement makes a nice alternative to an extremely long if / else statement.

Providing training since last Tuesday
http://www.technoblogical.com/
Thanks for watching!

p.s. If you want to download this, you can git it from my GitHub repositiory!
https://github.com/technoblogical/hol...