JavaScript Scope (Local vs Global)

preview_player
Показать описание
JavaScript Scope (Local vs Global)

Subscribe for more videos:

Want to learn more from me? Check out my blog and courses:

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

Thank you! This is the best explanation i've seen so far and it cleared my doubts. Thanks again .

dipanjanmondal
Автор

thank you vry much you just saved my life when no one could for my final exam :)

cecilia
Автор

I liked the Toothbrush example to make them go away from global variables. :D

anuragkhandelwal
Автор

Best Explanation I've seen about Scopes in Java Script. Thanks Mosh...

WiLDeveD
Автор

What I learnt: A global variable is like a toothbrush. Nah, kidding. Though I already know about scope, you did a great job there.

nextrie
Автор

Thanks Mosh for explaining the difference between Local and Global Scope so well. Well done!!

mlakshmiv
Автор

May Allaah bless you, brother Mosh ! Such an amazing teacher ! <3

fahmidhossainSakib
Автор

Thanks
Very simple and great teaching 😃

roodabehashoorpouri
Автор

i usually dont comment, u just nailed explaing

mirjalol_shamsiddinov
Автор

Thank you for the video! Your explanations are very good. It would be awesome if the videos covering these fundamental aspects of JS were longer.

alessandroporfirio
Автор

That was direct to the point thank you sir!

enohmarccelus
Автор

You sure are good at explaining things so that I understand :)

Felixxxxxxxxx
Автор

All I got, was "we get high on the console" 0:18 🚬

ChrisKGallon
Автор

So if global variables are bad, then how do you deal with async functions with callback and you need the result object?

YTEEsenior
Автор

Hi nice explanation...but there's a question in my mind...If we can change the value of the global 'const' variable inside a method, then what is the use of const?

eitisingh
Автор

isn't const stands for constant, and it's value remains the same?

aprilennd
Автор

Local variables are first prioritized over Global variables.

NetSkillNavigator
Автор

i've been using Codecademy, got stuck, needed some help, i was like oh hey, Mosh! yay. youre a great teacher ty

skeeterburke
Автор

what confuses me is that you said you should avoid doing global const but 100% of the tutorials im watching do global const's

AlexG-wknh
Автор

Thanks
Very simple and great teaching 😃

roodabehashoorpouri