JavaScript for Beginners #26 Variable Scope | Strict Mode

preview_player
Показать описание
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 Info article on scope and closure:

NodeJS:

VS Code:
Рекомендации по теме
Комментарии
Автор

Seriously the way you teach is phenomenal, I've learned more from a day of watching you than I have in two weeks elsewhere thank you so much

chrisolo
Автор

This one is my favorite series on basic JS. Whenever someone asks me how can they learn this language I always refer them to this playlist. Thank you so much for making this content free!

anarosol