Тёмный

57. What is Execution Context, Calling Stack, Lexical Environment, Environment Record in JavaScript? 

Miss Xing
Подписаться 10 тыс.
Просмотров 1,6 тыс.
50% 1

#MissXing #JavaScript #ExecutionContext #LexicalEnvironment #stack #hoisting #javascriptcreationphase
In this video, I explained how JavaScript engine execute our code with concepts like Execution Context, hositing, Calling Stack, Lexical Environment, Environment Record.

Опубликовано:

 

15 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
@eashan2405
@eashan2405 Год назад
The best explanation I ever found on this topic..!! thank you so much Miss Xing.
@macciocapatonda666
@macciocapatonda666 Год назад
You are a fantastic programmer and a great teacher. Thanks to you I finally understood how the execution context works.
@a_basic_sheep_1993
@a_basic_sheep_1993 2 года назад
great job
@tenzl
@tenzl Год назад
Hi, thank you very much for the video. I have a question though, I've always read that there is only a global execution context and a function execution context, but if I understand correctly from your videos, an execution context is created when there is a block of code that contains a let or a const? so the structure of that lexical environment for such a code block would not contain an arguments object, it only contains a reference to the parent lexical environment (called outer) and any let/consts that are defined within it? are function declarations inside such a block also only available in the if block's execution context or does the parent have access to the if block's function declaration?
@yourfavorite4165
@yourfavorite4165 Год назад
Did you find the answer to this question?
@eashan2405
@eashan2405 Год назад
No. For block scope containing let/const, a new Lexical environment is created, not an Execution context. However, the Lexical Environment functions similar to the Execution context.
@gt-uj6fz
@gt-uj6fz 2 года назад
hello, do you video about security in spring boot?
@and.v761
@and.v761 Год назад
what will happen with `a`, `b` and arguments obj if I assign a detail value to parameter on function declaration? example: function sum (a = 6, b =5) { console.log(a+b); }; sum();
@mitesh5189
@mitesh5189 Год назад
Then a ans b will be stored in local memory scope because you are assigning that values
@mitesh5189
@mitesh5189 Год назад
And if incase of a and b assigned to sum parents then also a and b will be considered as local memory (6,5) which ever first comes in chain will be considered
@and.v761
@and.v761 Год назад
​@@mitesh5189 so, what are differences between arg variable and argument object. whose value with be used firstly by function?
@mitesh5189
@mitesh5189 Год назад
@@and.v761 detail value to parameter is like default parameter so it will apply if you don`t pass any parameter time of function call (suppose you assign value of a and b before this function it won`t effect) but in case of if you pass different value in parameter it will use that value var a = 5; // this value won`t be consider by fun function myFunction(a=10, b=a) { // this value will be consider reason it`s in local scope console.log('a = ' + a + '; b = ' + b); } myFunction(); // a=10; b=10 myFunction(22); // a=22; b=22 myFunction(2, 4); // a = 2 b = 4
@and.v761
@and.v761 Год назад
@@mitesh5189 ok...There are a few things that are not clear. the argument object will record any real values that we pass into funciton. So, why we need declare the 'arg' variable as the video on creation phase?? I things argument object is enough. Get back my example function sum(a, b) { return a+b } sum(2,4) // creation phase: a=2, b=4, argument obj [0: 2, 1: 4] ????
@wightknight7056
@wightknight7056 2 года назад
You need time codes
@dumchik7290
@dumchik7290 11 месяцев назад
This video is very knowledgeful but your voice is not clear. It seems like u are chewing something, drinking your saliva and tries to explain us.
Далее
World’s Tallest Man VS Shortest Woman!
15:07
Просмотров 14 млн
AI can't cross this line and we don't know why.
24:07
Просмотров 322 тыс.
Let's Fix The Fatal Flaw in TypeScript's Union Types!
13:45
C++ Should Be C++ - David Sankel - C++Now 2024
1:28:49
Просмотров 17 тыс.