Learn JavaScript Scoping In 10 Minutes
One of the biggest mistakes JavaScript developers make is not fully understanding how scoping works. There are 4 different levels of scoping and if you donβt have a strong grasp of how they interact with each other it can be incredibly difficult to write complex JavaScript code. In this video I cover all 4 different levels of scoping in JavaScript and how you can use them to your advantage.
π Materials/References:
ES Modules Video: https://youtu.be/cRHQNNcYf6s
ES Modules Article: https://blog.webdevsimplified.com/2021-11/es6-modules/
π Find Me Here:
My Blog: https://blog.webdevsimplified.com
My Courses: https://courses.webdevsimplified.com
Patreon: https://www.patreon.com/WebDevSimplified
Twitter: https://twitter.com/DevSimplified
Discord: https://discord.gg/7StTjnR
GitHub: https://github.com/WebDevSimplified
CodePen: https://codepen.io/WebDevSimplified
β±οΈ Timestamps:
00:00 β Introduction
00:30 β What is a scope
02:12 β Global Scope
04:02 β Module Scope
05:53 β Block Scope
07:35 β Function Scope
08:55 β Using multiple variables with the same name
#Scoping #WDS #JavaScript