var let const in Javascript Scope | Understanding Global Local Function Block Scope
In this video we'll compare the keywords var, let, and const in JavaScript which also requires an understanding of JavaScript scopes such as global scope, local scope, function scope, and block scope.
▶ This video is part of the JavaScript Tutorials for Beginners Playlist found here: https://www.youtube.com/playlist?list=PL0Zuz27SZ-6Oi6xNtL_fwCrwpuqylMsgT
✅ Quick Concepts outline:
var, let, and const in Javascript
(00:00) Intro
(0:30) What makes var different
(1:40) What makes let different
(2:05) What makes const different
(2:35) A discussion of scope
(2:50) Global Scope
(3:25) Local Scope
(3:35) Block Scope
(4:00) Function Scope
(4:45) Local Scope variables declared with let or const are not available in global scope
(6:00) Nested block scope inside of a function
(7:05) Global scope variables are available in local scopes
(8:00) Global scope is available to all scopes
(8:25) If statements have block scopes
(8:35) for loops have block scopes
(8:45) switch statements have block scopes
(9:00) Review of scopes so far...
(9:50) A 2nd Example of global, function, and block scopes
(14:40) Note: var is function scoped; const & let are block scoped
(15:45) Review with helpful graphic :)
📚 Further Reading:
MDN Web Docs:
Scope: https://developer.mozilla.org/en-US/docs/Glossary/Scope
Global Scope: https://developer.mozilla.org/en-US/docs/Glossary/Global_scope
Local Scope: https://developer.mozilla.org/en-US/docs/Glossary/Local_scope
Eloquent JavaScript Chapter 3:
https://eloquentjavascript.net/03_functions.html
📺 More Beginner JS Videos:
freeCodeCamp: https://youtu.be/PkZNo7MFNFg
Traversy Media: https://youtu.be/hdI2bqOjy3c
The Net Ninja: https://youtu.be/iWOYAxlnaww
✅ Follow Me:
Twitter: https://twitter.com/yesdavidgray
Reddit: https://www.reddit.com/user/DaveOnEleven
Medium: https://medium.com/@davegray_86804
#var #let #const
Видео var let const in Javascript Scope | Understanding Global Local Function Block Scope канала Dave Gray
▶ This video is part of the JavaScript Tutorials for Beginners Playlist found here: https://www.youtube.com/playlist?list=PL0Zuz27SZ-6Oi6xNtL_fwCrwpuqylMsgT
✅ Quick Concepts outline:
var, let, and const in Javascript
(00:00) Intro
(0:30) What makes var different
(1:40) What makes let different
(2:05) What makes const different
(2:35) A discussion of scope
(2:50) Global Scope
(3:25) Local Scope
(3:35) Block Scope
(4:00) Function Scope
(4:45) Local Scope variables declared with let or const are not available in global scope
(6:00) Nested block scope inside of a function
(7:05) Global scope variables are available in local scopes
(8:00) Global scope is available to all scopes
(8:25) If statements have block scopes
(8:35) for loops have block scopes
(8:45) switch statements have block scopes
(9:00) Review of scopes so far...
(9:50) A 2nd Example of global, function, and block scopes
(14:40) Note: var is function scoped; const & let are block scoped
(15:45) Review with helpful graphic :)
📚 Further Reading:
MDN Web Docs:
Scope: https://developer.mozilla.org/en-US/docs/Glossary/Scope
Global Scope: https://developer.mozilla.org/en-US/docs/Glossary/Global_scope
Local Scope: https://developer.mozilla.org/en-US/docs/Glossary/Local_scope
Eloquent JavaScript Chapter 3:
https://eloquentjavascript.net/03_functions.html
📺 More Beginner JS Videos:
freeCodeCamp: https://youtu.be/PkZNo7MFNFg
Traversy Media: https://youtu.be/hdI2bqOjy3c
The Net Ninja: https://youtu.be/iWOYAxlnaww
✅ Follow Me:
Twitter: https://twitter.com/yesdavidgray
Reddit: https://www.reddit.com/user/DaveOnEleven
Medium: https://medium.com/@davegray_86804
#var #let #const
Видео var let const in Javascript Scope | Understanding Global Local Function Block Scope канала Dave Gray
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Differences Between Var, Let, and Const](https://i.ytimg.com/vi/9WIJQDvt4Us/default.jpg)
![What is Scope in JavaScript?](https://i.ytimg.com/vi/bD-62OMzni0/default.jpg)
![Arrays in Javascript | Arrays Tutorial for Beginners](https://i.ytimg.com/vi/0SyTDl4pb4w/default.jpg)
![var let const | Function scope vs Block scope | Front-end interview series | Ep. 5](https://i.ytimg.com/vi/mxqjBtYZmuU/default.jpg)
![](https://i.ytimg.com/vi/HuNMyqVVnLo/default.jpg)
![17: Let and Const Variables | JavaScript Block Scope and Function Scope | JavaScript Tutorial](https://i.ytimg.com/vi/aK_nuUAdr8E/default.jpg)
![](https://i.ytimg.com/vi/Y1X9kMovorM/default.jpg)
![Reference Vs Value In JavaScript](https://i.ytimg.com/vi/-hBJz2PPIVE/default.jpg)
![Learn JavaScript Generators In 12 Minutes](https://i.ytimg.com/vi/IJ6EgdiI_wU/default.jpg)
![JavaScript Let vs Var vs Constant | Mosh](https://i.ytimg.com/vi/XgSjoHgy3Rk/default.jpg)
![JavaScript Pro Tips - Code This, NOT That](https://i.ytimg.com/vi/Mus_vwhTCq0/default.jpg)
![#28 What is this? | JavaScript](https://i.ytimg.com/vi/kE93zNJBCBw/default.jpg)
![Javascript Closure Tutorial | Closures Explained](https://i.ytimg.com/vi/1S8SBDhA7HA/default.jpg)
![JavaScript Let, Const & Var: A Complete Guide](https://i.ytimg.com/vi/dzEieWaOJE0/default.jpg)
![¿Que son los Closures en JavaScript, como funcionan y por qué dan tanto miedo a los programadores? 📒](https://i.ytimg.com/vi/bPZpjI2tzRo/default.jpg)
![10 JavaScript Projects in 10 Hours - Coding Challenge 🔥](https://i.ytimg.com/vi/dtKciwk_si4/default.jpg)
![Learn JSON in 10 Minutes](https://i.ytimg.com/vi/iiADhChRriM/default.jpg)
![Javascript Modules | Export Import Syntax for ES6 Modules](https://i.ytimg.com/vi/Q3SBogjUfMk/default.jpg)
![JavaScript Scope (Local vs Global)](https://i.ytimg.com/vi/iJKkZA215tQ/default.jpg)
![Passing data from PHP to JavaScript: methods, their pros and cons, and how to implement them](https://i.ytimg.com/vi/u4HmQjLvNe8/default.jpg)