Here, we will look at the scope of a variable that is declared with let, const, and var. We will discuss global scope, local scope, and function scope.
0:00 What is variable scope in JavaScript
0:36 Creating global variables
1:09 Setting up a code block {}
1:37 Block scope const and let
2:11 var does not have block scope
2:44 Assigning variables inside of a block with let
6:45 Assigning variables inside of a block with var
7:21 Function scope
10:12 Creating same name variables outside of a function
11:10 Local variables are deleted when the function is done
12:36 Strict mode in JavaScript
JavaScript Playlist:
• JavaScript for Beginners
JavaScript Info article on scope and closure:
https://javascript.info/closure
NodeJS:
nodejs.org
VS Code:
code.visualstudio.com
Watch video JavaScript for Beginners #26 Variable Scope | Strict Mode online without registration, duration hours minute second in high quality. This video was added by user GreeneMath.com 23 January 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 348 once and liked it 13 people.