JavaScript for Beginners #26 Variable Scope | Strict Mode

Опубликовано: 06 Октябрь 2024
на канале: GreeneMath.com
348
13

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