WOW! QUITE IMPRESSIVE AN EXPLANATION OF SCOPE AND CLOSURE! I THINK, THAT I DO UNDERSTAND WHAT YOU MEAN, BUT IT IS REALLY DIFFICULT TO FIGURE OUT. THANKS A LOT FOR YOUR GREAT WORK!
It's a little bit of different from the traditioinal stack execution model, isn't it? traditional execution stack model like a pyramid, the new coming callabl object is stack on the last callable object, so the top one can access almost the stacked symbol. but in your animation, runexpression callable object is get ridded after it executed. while it's not.
Fantastic video! Far to many explanations of these concepts abstract away from the underlying mechanics. As a result a lot of value is lost for an individual seeking to understand the concept. Thank you.
add console.log("check") after add(); AND add a console.log in the add method. so it will prove that add method has been executed but the b is wipe out stack, so my added statement will execute and log out a word, so the b below is totally new one, it is none of the b in add method business. this b is just not defined, cause its hoisting only hoist the defined symbols, like var ***, const ***, and the first citizen symbol. anyway, thanks a lot.. thanks your great work.
error @3:34....runExpression() is not returning add() but the value 100
Best explanation of JS closures and I have watched dozens of videos and I have red dozens of articles about this topic! Keep up the good work!
WOW! QUITE IMPRESSIVE AN EXPLANATION OF SCOPE AND CLOSURE! I THINK, THAT I DO UNDERSTAND WHAT YOU MEAN, BUT IT IS REALLY DIFFICULT TO FIGURE OUT. THANKS A LOT FOR YOUR GREAT WORK!
Thank you for explaining closures so well !!!!!
Briilliantly explained. This concept was literally giving me a headache until I found your video, and I get it now. Thank you so much.
very good explanation, thank you very much.
It's a little bit of different from the traditioinal stack execution model, isn't it? traditional execution stack model like a pyramid, the new coming callabl object is stack on the last callable object, so the top one can access almost the stacked symbol. but in your animation, runexpression callable object is get ridded after it executed. while it's not.
Fantastic video! Far to many explanations of these concepts abstract away from the underlying mechanics. As a result a lot of value is lost for an individual seeking to understand the concept. Thank you.
Great great content!!!
I'm a new fan
Ssys stack..but shows queue
add console.log("check") after add(); AND add a console.log in the add method. so it will prove that add method has been executed but the b is wipe out stack, so my added statement will execute and log out a word,
so the b below is totally new one, it is none of the b in add method business. this b is just not defined, cause its hoisting only hoist the defined symbols, like var ***, const ***, and the first citizen symbol.
anyway, thanks a lot.. thanks your great work.
You're very correct. The call to Add() is actually executed but the variable 'b' is out of scope. So it can not be accessed from the outside.
doesnt the stackdirection go from bottom to top , unlike your explanation ?
What a lovely accent..
pots or parts lol?
Function runExpression always return 100 and it's not result of function add(). Wrong example !!!