Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap
STOP Using Switch! In this tutorial we'll discuss why you should stop using switch and use a couple of other available options instead of using switch statements. This tutorial applies to both Vanilla Javascript and Node.js.
🚩 Subscribe ➜ https://bit.ly/3nGHmNn
🚀 JavaScript for Beginners: Full Course (8 hours): • JavaScript Full Course for Beginners | Com...
STOP Using Switch Statements! Use These Instead...
(00:00) Intro
(00:05) Welcome
(00:18) Switch Statements
(01:34) Lookup Objects (or object lookups)
(02:58) How to have a default value
(03:55) ES6 Maps
(05:40) Review
(06:14) Maps vs Objects
Reference:
MDN Maps vs Objects:
https://developer.mozilla.org/en-US/d...
✅ Follow Me:
Twitter: / yesdavidgray
LinkedIn: / davidagray
Blog: https://yesdavidgray.com
Reddit: / daveoneleven
Was this tutorial about avoiding switch statements and instead using object lookups or Map objects helpful? If so, please share. Let me know your thoughts in the comments.
#stop #switch #statements
On this page of the site you can watch the video online STOP Using Switch Statements! Use These Instead... with a duration of hours minute second in good quality, which was uploaded by the user Dave Gray 07 September 2021, share the link with friends and acquaintances, this video has already been watched 27,727 times on youtube and it was liked by 1 thousand viewers. Enjoy your viewing!