1.JS creates Global excution context 2.Next it creates memory phase 3.Memory phase - In this phase,the variables are set to undefined until the execution phase(next phase) and the functions are set to their definitions. 4.Next it creates the execution phase 5.Execution phase - In this phase,the variables are initialsed to given values and when the function s are called,it creates a memory phase and execution phase for the function just like the main one. For live demo: browser > inspect > Sources create a snippet with few functions and visually experience the call stack. correct me if there are any mistakes or add to this if something is missing.
Understand call stack with the help of live demo : browser > inspect > Sources 1.then create a snippet by clicking on the arrow(>>) next to workspace 2.then write down some functions in the created snippet ,do save them by ctrl+S 3.Create breakpoints and run the code and keep eye on call stack to visualize how it works. correct me if there are any mistakes or add to this if something is missing.
I am having two years experience as a front-end developer but the things cleared here that was no one explain. Even not talked about, so thanks a lot for your way of teaching. 👏👏
@@parimalgurjar9553 yes u can just make a good resume, make good projects and highlight them in your resume and add your skills and projects on the top of every section.
🔵The working of the JavaScript works on three phases: 1. Global Execution Context 2. Memory phase / Creation phase 3. Execution phase 🔵Phase 1: Global Execution Context The value of `this` keyword is set to Global Execution Context (which is an empty Object in NODE environment, & window object in browser environment) 🔵Phase 2: Memory phase During this phase, JS engine scans the code and assigns the initial values for the variables , functions, etc.. For variables they are 'undefined' and for functions they are set to their function definition 🔵Phase 3: Execution phase After the creation phase completed, the execution phase begins where actual values of the variables are set. And when the functions are called it creates a new 'Function Execution' context which consists of two phases (they works same as explained above but only for the particular function scope): 1. Memory phase 2. Execution phase 📝The return value of the 'Function Execution' context is passed to the Global Execution Context Amazing videos Hitesh Sir, Learning a lot..!! 🔴Correct me if something I explained is Wrong
Global Execution Context contains two phases 1. memory component 2. code execution component --- In memory component memory is reserved for variables(initially assinged with undefined) and functions(assigned with defination) whereas in code execution component all assignment of variables, calculations etc. are performed.
Sir this video was much needed. Coding toh theek hai practice se aa jaati hai lekin yeh in depth baatein aage interviews mein kaafi acha impression bana ti hai. This is a good and in depth video
Amazing video i never seen a educator who teach and talked about any language & in its components in this depth.... Thanku for this and please post more videos like this ...
Ek saal se jyada hone ke baad iss video ko dekh raha hu. Pr quality last year se abhi tak mei kahin nahi mili aisi. Isse clearly pata chalta hai ki @chaiaurcode kaafi teachers se 1 saal pehle hi itna cover karke bethe the. Thanks for the work sir. We'll appriciate your work and yes, things will come up. Let's see
very good understanding 💯 with chai aur code thank thanks mr. hitesh choudhary sir .......... There are three types of execution contexts in JavaScript: Global execution context: This is the default execution context that is created when the code is executed in a global scope. Function execution context: This is the execution context that is created when a function is called. Eval execution context: This is the execution context that is created when the eval() function is called
Very depth explanation after 4 years of working today I understand how JavaScript exactly works... Thanks Hitesh sir...i have seen many other videos but not understood
hatsoff to you.... I landed to watch your react video , but in react video you said, dont watch it if you dont know javascript.... That was turning point for , coz I never heard a youtuber says, dont watch this if you you dont know that first.... In fact I bought a code on udemy for react , but couldn't complete as the person used all advance concept of JS, but in the begining he said , you can learn react even ifyou are naive to JS...Believe me I couldn't complete... its still there... BIG SALUTE TO YOUR TEACHING STYLE.... WORLD IS RUNNING COZ OF GIVERS LIKE YOU :)
sir aap jaise Guru ji ho to Career Set hai. Maine last Year WS CUBETECH SE MERN STACK ka Course RS.40000 me kiya tha but itna depth me nhi padha. sirf basic hi padhaya gaya tha jis se mujhe kabhi laga hi nhi ki mujhe JS ati hai . aab confidence aa rha hai .
i'm frontend and backend developer , working on js and jquery from last 2-3 year i just seen your react videos which is very intertesting so i want to see to js playlist , but the concept i see , i was not learned in my whole career because in the playlist you execute the code in every senrio ether its a error or not . I loved it so much and it clear many concept truly appricated. I shared your channel to my collegue and my known IT student as well
Ye concept maine kahin padha nahi tha. Main ek Google Apps Script ke andar ek project bana raha tha to wahan debugging karte time se notice kiya tha. Abhi aur bhi clear ho gaya.
Here we see how code execute in js. how call Stack work inside memory ? First we see execution context Second we see call stack(means how fuction goes inside memory and how function exit from that memory ) We see all it in browser Environment. Execution Context means how js run and execute the file you made. js run your program in two phase If you create js code file , the 1st thing that is created is global EC . and this global EC refrence is kept inside this . Or Browser ,or diifferent different js environment EC are different . In browser EC this(keyword) contains window object. Types of EC 1 Global EC 2 Function/Functional EC or 3 Eval EC (It is property of global object So we say it Global EC ) -> How does js code executed ? js code run in two phases. 1> Memory Creation phase / Memory Phase 2> Exececution phase ->Here we see Execution phase in detail Steps Involved: 1> Firstly Global EC are created and stored in this(keyword) 2> Memory Phase - All variables are collected and memory allocated to it. initially all variables assign with undefined. and all function assign with its defination. this step is called first cycle. 3> Execution Phase variables are assign with its values. function creats it own New Execution context (And this context contain variable environment and execution thread that perform all execution ) And inside that Memory creation phase and Execution phase take place for function . Now function return return-back value to Global/Parent Execution Context. And the Fuction Exection context after returning values to parent get deleted/vanishes. function new-Execution context created as many time time as it encounter new function in program. ->Now we explore call Stack. It is like stack . First at first at the bottom there is Global EC and further the function EC context are coming as they need to execute and after executing its EC it exit from the stack. Here Function EC come in LIFO fashion(Last in First Out) in call Stack Thank You Hitesh Sir , For this amazing Content , Love the way you teaching . If anyone watching this video lecture even after 5 years from now and reading small amount of official documentation like mdn they got every concept clearly.
At 15:30 we created Memory Phase and Execution Context for addNum Function In its memory phase we have val1 and val2 but in execution phase we are assigning value to num1 and num2. How we are assigning if memory is not allocated to num1 and num2? or it should be num1 and num2 in memory phase
I think in the memory phase, we will have 'num1' and 'num2' as we are talking about the execution context of 'addNum' function and not the global execution context. And so, in the execution phase, we will assign the values to num1 and num2 and not val1 and val2.
I'm 24 years old now, and up until today, I have never subscribed to anyone on UA-cam. You're the first and only one I've subscribed to! Thanks so much for the JavaScript tutorials-they've been incredibly helpful. What I love the most is how you explain everything so slowly and clearly. It makes learning so much easier. Your teaching style is truly one of a kind! 🤍
IMP DOUBT: I think variable declared with "let" should be replaced by "var", because on adding breakpoints and running on browser, var is giving "undefined (that is in Global scope)" and let is giving "value unavailable (that is in Script scope)". Reason behind this is "var" can be accessed before its execution and gives value as "undefiend", whereas "let" and "const" gives error that "they cannot be accessed before initialization"". REASON: Because of Temporal Dead Zone.
One of the best js video where you'll now never forget how the JS Execution Context Work. One of the best JS Series. I'll highly recommend who's complete beginner.
16:28 Remember guys, That does not happen immediately, first, the code is executed within its execution context, and it is retained in the call stack, when the function completes the execution context is popped off the stack.
This free video is more effective and full of real content than paid courses. Really doing the great job with the content and the selection of important topics.
Context are of type : Global Execution Context Function Execution Context Eval Execution Context Javascript code is run in two phases : Memory creation phase (or called creation phase) : in this phase only memory is allocated to the variables functions Execution phase : Code is executed in this ohase For every time the code is execute, a context is created, which consist of : New Variable Enviorment Execution Thread It returns the variable to the parent context, ie. global execution context, and then it is delete to free up the memory ** Plz correct if I missed anything **
kaash ye video mujhe pehle hi mila tho muje javascript samjneme uthna mushkil nehi hothi(abhee bhee mai Js padaikar raheehuu chai aur code ki jacascript dhekne ko shuru kiya )... Sir esee tharah information vale video bhejthe rahihe .... dhil se bhoth hi Shukriya (from kerala)
Thank you sir for the detailed explanation. I have watched many videos but never seen such method of explanation and offcourse no one teaches such type of content. So, I appreciate you sir. And I hope your channel grow more and more as you make your videos with this type of detailed information. I really like it a lot. I am looking forward to learn with you. Thank you.
whenever i see sir's video notification it makes me feel so good. Even though I know the basics but still i watch it because itna deep teaching koi nai karta.. thanks
Hitesh Sir, honestly i fell very lucky to found this channel. I was struggling to learn JS basics + Depth. But here, Found the exact content i was looking for. You made learning JS a fun activity. Would definately like to proceed further with all your publised content, after JS completion. Also, i shared on linked. Because: const Motivation = "zaruri h apke liye bhi" 😁
This is really an amazing video on javascript. This detailed explanation deserves a ❤. thanks Hitesh sir for bringing this js series to the next level really loving this ❤❤❤ Thanks 😊
00:03 Understanding JavaScript Code Execution 01:56 JavaScript Execution Context is how the script runs and executes code. 05:40 The memory creation phase is the first phase in executing JavaScript code. 07:33 The execution of JavaScript code involves a Global Execution phase and a Memory Creation phase. 11:36 JavaScript executes code by creating separate execution contexts for each function. 13:40 Execution context is where the code is executed and variables are stored. 17:29 Execution context and call stack are key components of JavaScript execution. 19:10 Understanding execution context and call stack in JavaScript 23:03 Execution process in JavaScript involves loading, memory phase, and execution phase 24:44 Executing code and call stack explained
Thanks a lot Hitesh sir. Aise execution aapne samjhaya, I believe no one can. But after watching your video, I can explain it to others. You are right, teaching is an art. :)
Description ho to Hitesh Sir ki video jaisa ho nhi to n ho 😅 wahh kya likhe h Instagram pe yahn se jaate h .... 😅 Are dada 🙏🏻 superb Sir Literally 😅 u r somthing different but great 😃
This is really an amazing video on javascript. This detailed explanation deserves a ❤. thanks Hitesh sir for bringing this js series to the next level really loving this ❤❤❤ Thanks 😊🥰🥰🥰🥰
Really you are just awesome!!! Even i started React course first but you told first learn JavaScript in depth so just thought to just go through once as i already working in JS. But after starting i take oath that will learn all the small small things also in depth not just to finish things but to know things and that is turning points for me. Thanks a lot for depth course
In starting JavaScript engine creates call stack. In call stack => first global execution context is created. In global execution context => it creates memory phase In memory phase => it assigns memory to all variables and functions, after completion of memory phase it creates execution phase In execution phase => it assigns values to the variable and when any function is invoked then it pushed into call stack and new execution context is created when function finishes its execution then it pushed out from the call stack and process goes on. call stack works on Last In First Out.
➡Creation of the Global Execution Context: When a JavaScript program starts running, it creates the global execution context. This context consists of two phases: the memory phase and the execution phase. ➡Memory Phase: During the creation phase, the JavaScript engine sets up the global object (which is the window object in a browser environment), the 'this' keyword, and the outer environment reference. It also scans through the code and sets up memory space for variables and functions through a process called "hoisting." Variables are set to undefined, and functions are stored in their entirety. ➡Execution Phase: After the creation phase, the execution phase begins. This is where the actual code is executed line by line. ➡Function Execution: When a function is called, a new execution context is created for that function. This includes its own memory space for variables and parameters. The function goes through its own creation and execution phases. After the function finishes executing, its execution context is popped off the call stack. ➡Call Stack: The call stack is a data structure that keeps track of the execution context of the program. It follows the Last In, First Out (LIFO) principle. As functions are called, their execution contexts are added to the top of the call stack. When a function completes its execution, its context is removed from the top of the call stack. ➡Global Execution Completion: Once the global execution context completes, the program finishes its execution. 📝Note: the returned value being passed to the global environment, it's more accurate to say that the returned value is passed to the calling context. If a function is called within another function, the returned value is typically used in the context of the calling function. Great video Hitesh sir. correct me if something wrong in above text.
This was such a good video, it took me 2 times to completely understand the topic. I made sure to take notes this time, it helps a lot, at least in my case. Thank you for existing 😁
"This course is absolutely awesome! The content is top-notch, presented in a way that's both engaging and easy to understand. Kudos to the creator for breaking down complex concepts so simply. Truly a gem for anyone looking to grasp the topic effortlessly!" React bi start kar le chai k sath please
I was following many UA-camrs for learning. But here is something special each and everything going in-depth, I like it, Thank you for such a great videos and sharing appericiable knowledge.🥰😍🤩
1.JS creates Global excution context
2.Next it creates memory phase
3.Memory phase - In this phase,the variables are set to undefined
until the execution phase(next phase) and the functions are set to their definitions.
4.Next it creates the execution phase
5.Execution phase - In this phase,the variables are initialsed to given values and
when the function s are called,it creates a memory phase and execution phase for the function
just like the main one.
For live demo:
browser > inspect > Sources
create a snippet with few functions and visually experience the call stack.
correct me if there are any mistakes or add to this if something is missing.
Returned value is passed to the global environment
Execution context gets deleted as well
If you can elaborate a little more on the demo part, like how to do things over there on browser, anyways u've done a good job 👍my friend
Understand call stack with the help of live demo :
browser > inspect > Sources
1.then create a snippet by clicking on the arrow(>>) next to workspace
2.then write down some functions in the created snippet ,do save them by ctrl+S
3.Create breakpoints and run the code and keep eye on call stack to visualize how it works.
correct me if there are any mistakes or add to this if something is missing.
can anyone explain factorail program using recursion ?
`function factorial(n) {
if (n === 0 || n === 1) {
return 1;
}
return n * factorial(n - 1);
}
// Example usage:
console.log(factorial(5)); // Output: 120`
I am having two years experience as a front-end developer but the things cleared here that was no one explain. Even not talked about, so thanks a lot for your way of teaching. 👏👏
Hello,
I know HTML CSS JavaScript and python can I get a job?
@@parimalgurjar9553 yes u can just make a good resume, make good projects and highlight them in your resume and add your skills and projects on the top of every section.
@@parimalgurjar9553 no you cannot
u have 2 years of experience and u don't know the basics concepts .😂
@@tarunpanwar6983 beta tum nhi samjhoge...
That what making this tut standout from other because you're advance concepts in basic and covering all complex concepts in early stage..keep going
Bne rhiye, web development me expert kr denge
Thank you so much for this clear explanation @chaiaurcode hitesh sir.
Outsdanding....
Bas Aapka hi intezar tha sir
Honestly, no one has every explained like this before. u really deserve appreciation....
🔵The working of the JavaScript works on three phases:
1. Global Execution Context
2. Memory phase / Creation phase
3. Execution phase
🔵Phase 1: Global Execution Context
The value of `this` keyword is set to Global Execution Context (which is an empty Object in NODE environment, & window object in browser environment)
🔵Phase 2: Memory phase
During this phase, JS engine scans the code and assigns the initial values for the variables , functions, etc.. For variables they are 'undefined' and for functions they are set to their function definition
🔵Phase 3: Execution phase
After the creation phase completed, the execution phase begins where actual values of the variables are set. And when the functions are called it creates a new 'Function Execution' context which consists of two phases (they works same as explained above but only for the particular function scope):
1. Memory phase
2. Execution phase
📝The return value of the 'Function Execution' context is passed to the Global Execution Context
Amazing videos Hitesh Sir,
Learning a lot..!!
🔴Correct me if something I explained is Wrong
ap na corse complete kar lia ha?
Global Execution Context contains two phases 1. memory component 2. code execution component --- In memory component memory is reserved for variables(initially assinged with undefined) and functions(assigned with defination) whereas in code execution component all assignment of variables, calculations etc. are performed.
Sir this video was much needed. Coding toh theek hai practice se aa jaati hai lekin yeh in depth baatein aage interviews mein kaafi acha impression bana ti hai.
This is a good and in depth video
Amazing video i never seen a educator who teach and talked about any language & in its components in this depth....
Thanku for this and please post more videos like this ...
Seen first time how program runs in memory!
Thnx Hitesh ji!
I was waiting for this to understand since 2011...!
Ek saal se jyada hone ke baad iss video ko dekh raha hu. Pr quality last year se abhi tak mei kahin nahi mili aisi. Isse clearly pata chalta hai ki @chaiaurcode kaafi teachers se 1 saal pehle hi itna cover karke bethe the. Thanks for the work sir. We'll appriciate your work and yes, things will come up. Let's see
very good understanding 💯 with chai aur code thank thanks mr. hitesh choudhary sir ..........
There are three types of execution contexts in JavaScript:
Global execution context: This is the default execution context that is created when the code is executed in a global scope.
Function execution context: This is the execution context that is created when a function is called.
Eval execution context: This is the execution context that is created when the eval() function is called
brilliant video, no one explains such complex topics with such ease, LEGENDARY
one of the best video of an entire js series I have watched!!!!!!
I love it
Never seen such detailed video on execution context... hats off
Very depth explanation after 4 years of working today I understand how JavaScript exactly works... Thanks Hitesh sir...i have seen many other videos but not understood
Even if this series is one year old, I'm watching it and loving it thank u so much love from BD man!
hatsoff to you.... I landed to watch your react video , but in react video you said, dont watch it if you dont know javascript.... That was turning point for , coz I never heard a youtuber says, dont watch this if you you dont know that first....
In fact I bought a code on udemy for react , but couldn't complete as the person used all advance concept of JS, but in the begining he said , you can learn react even ifyou are naive to JS...Believe me I couldn't complete... its still there... BIG SALUTE TO YOUR TEACHING STYLE.... WORLD IS RUNNING COZ OF GIVERS LIKE YOU :)
sir aap jaise Guru ji ho to Career Set hai.
Maine last Year WS CUBETECH SE MERN STACK ka Course RS.40000 me kiya tha but itna depth me nhi padha. sirf basic hi padhaya gaya tha jis se mujhe kabhi laga hi nhi ki mujhe JS ati hai .
aab confidence aa rha hai .
i'm frontend and backend developer , working on js and jquery from last 2-3 year i just seen your react videos which is very intertesting so i want to see to js playlist , but the concept i see , i was not learned in my whole career because in the playlist you execute the code in every senrio ether its a error or not . I loved it so much and it clear many concept truly appricated. I shared your channel to my collegue and my known IT student as well
Ye concept maine kahin padha nahi tha. Main ek Google Apps Script ke andar ek project bana raha tha to wahan debugging karte time se notice kiya tha. Abhi aur bhi clear ho gaya.
If I will get a job in fullstack developer with 4 LPA. I will buy 2 or 3 chai for you from my first salary.
Thank you Hitesh Sir,
This is the best detailed video in all of youTube , Keep up the Good Work!
You are a great teacher , Thanks!
You really deserve appreciation for this type of content ❤
Here we see how code execute in js.
how call Stack work inside memory ?
First we see execution context
Second we see call stack(means how fuction goes inside memory and how function exit from that memory ) We see all it in browser Environment.
Execution Context means how js run and execute the file you made.
js run your program in two phase
If you create js code file , the 1st thing that is created is global EC .
and this global EC refrence is kept inside this . Or Browser ,or diifferent different js environment EC are different . In browser EC this(keyword) contains window object.
Types of EC
1 Global EC
2 Function/Functional EC
or
3 Eval EC (It is property of global object So we say it Global EC )
-> How does js code executed ?
js code run in two phases.
1> Memory Creation phase / Memory Phase
2> Exececution phase
->Here we see Execution phase in detail
Steps Involved:
1> Firstly Global EC are created and stored in this(keyword)
2> Memory Phase - All variables are collected and memory allocated to it.
initially all variables assign with undefined.
and all function assign with its defination.
this step is called first cycle.
3> Execution Phase
variables are assign with its values.
function creats it own New Execution context
(And this context contain variable environment and execution thread that perform all execution )
And inside that Memory creation phase and Execution phase take place for function .
Now function return return-back value to Global/Parent Execution Context.
And the Fuction Exection context after returning values to parent get deleted/vanishes.
function new-Execution context created as many time time as it encounter new function in program.
->Now we explore call Stack.
It is like stack .
First at first at the bottom there is Global EC and further the function EC context are coming as they need to execute and after executing its EC it exit from the stack.
Here Function EC come in LIFO fashion(Last in First Out) in call Stack
Thank You Hitesh Sir , For this amazing Content , Love the way you teaching .
If anyone watching this video lecture even after 5 years from now and reading small amount of official documentation like mdn they got every concept clearly.
Kya baat hai hitesh sir ❤ , kitna depth ma explain kiya hai ...
Aage bhi aise depth mai concept karte rehna ...
Thank you 🙌 sir...
Thank you so much for such clear explaination of Global context execution,functional context execution and call stack. This video is very helpful.
Glad it was helpful!
At 15:30 we created Memory Phase and Execution Context for addNum Function
In its memory phase we have val1 and val2 but in execution phase we are assigning value to num1 and num2.
How we are assigning if memory is not allocated to num1 and num2? or it should be num1 and num2 in memory phase
same query,someone please reply!!!
is the doubt cleared? I have the same doubt
I think in the memory phase, we will have 'num1' and 'num2' as we are talking about the execution context of 'addNum' function and not the global execution context. And so, in the execution phase, we will assign the values to num1 and num2 and not val1 and val2.
I'm 24 years old now, and up until today, I have never subscribed to anyone on UA-cam. You're the first and only one I've subscribed to! Thanks so much for the JavaScript tutorials-they've been incredibly helpful. What I love the most is how you explain everything so slowly and clearly. It makes learning so much easier. Your teaching style is truly one of a kind! 🤍
Sir literally kahi aisi series ni dekhi
IMP DOUBT:
I think variable declared with "let" should be replaced by "var", because on adding breakpoints and running on browser, var is giving "undefined (that is in Global scope)" and let is giving "value unavailable (that is in Script scope)".
Reason behind this is "var" can be accessed before its execution and gives value as "undefiend", whereas "let" and "const" gives error that "they cannot be accessed before initialization"".
REASON: Because of Temporal Dead Zone.
I also have the same doubt.
Huge respect to you sir for making this
series of java script
🙏🙏🙏🙏🙏
One of the best js video where you'll now never forget how the JS Execution Context Work. One of the best JS Series.
I'll highly recommend who's complete beginner.
16:28 Remember guys, That does not happen immediately, first, the code is executed within its execution context, and it is retained in the call stack, when the function completes the execution context is popped off the stack.
Honestly, no one has explain like this. u really deserve appreciation....👍👍👍
Mind blowing video. I've read the docs on CallStack several times but never had I have this level of clarity.
Simply AMAZING Hitesh ji
Sir kitna acche se samjhaya aapne , aapka samjahane ka tarika bhot accha hai Thank You
🙂🙃
For the first time, I saw such a deep JavaScript memory allocation video on UA-cam. ..Thank you very much Sir
One of the Greatest Teacher I ever come across.Hands
Down
Really awesome Explanation sir 👍👍
Liked the in-depth explaination of the concepts. thanks for such tutorials.
Literaaly Sir not even in the paid course. This kind of indepth content. We will not get. Thank you so much sir.
This free video is more effective and full of real content than paid courses. Really doing the great job with the content and the selection of important topics.
Thank you so much for the great indepth explanation! It was an excellent explanation!
Glad it was helpful!😊☕️
Context are of type :
Global Execution Context
Function Execution Context
Eval Execution Context
Javascript code is run in two phases :
Memory creation phase (or called creation phase) : in this phase only memory is allocated to the variables functions
Execution phase : Code is executed in this ohase
For every time the code is execute, a context is created, which consist of :
New Variable Enviorment
Execution Thread
It returns the variable to the parent context, ie. global execution context, and then it is delete to free up the memory
** Plz correct if I missed anything **
ap na corse complete kar lia ha?
Crazy Explanation...probably the best video on Execution Context
kaash ye video mujhe pehle hi mila tho muje javascript samjneme uthna mushkil nehi hothi(abhee bhee mai Js padaikar raheehuu chai aur code ki jacascript dhekne ko shuru kiya )... Sir esee tharah information vale video bhejthe rahihe .... dhil se bhoth hi Shukriya (from kerala)
efforts much much appretiated.
Glad you think so!🤗☕️
Thank you sir for the detailed explanation. I have watched many videos but never seen such method of explanation and offcourse no one teaches such type of content. So, I appreciate you sir. And I hope your channel grow more and more as you make your videos with this type of detailed information. I really like it a lot. I am looking forward to learn with you. Thank you.
It's amazing explanation on UA-cam.. I can't believe this type of content gives you free.. thankyou hitesh sir..
I knew about this but in bits & pieces, thank you so much sir, now I got to understand it completely
Now the execution of the JavaScript code is cleared. Thanks hitesh sir for making top quality content❤❤
whenever i see sir's video notification it makes me feel so good. Even though I know the basics but still i watch it because itna deep teaching koi nai karta.. thanks
That's great! Everything is explained like bread and butter. Btw watching from Bangladesh. Best of luck brother.
"This video clearly explains JavaScript code execution and call stack concepts. Informative!"
Lovely explanation with that last example
Hitesh Sir, honestly i fell very lucky to found this channel. I was struggling to learn JS basics + Depth. But here, Found the exact content i was looking for. You made learning JS a fun activity. Would definately like to proceed further with all your publised content, after JS completion.
Also, i shared on linked. Because:
const Motivation = "zaruri h apke liye bhi" 😁
Thank you sir, this is what every javascript course lack. I really enjoyed the video.
This is really an amazing video on javascript. This detailed explanation deserves a ❤. thanks Hitesh sir for bringing this js series to the next level really loving this ❤❤❤
Thanks 😊
literally I'm enjoying doing code, with your playlist. Thank you so much, much love from jaipur
Great Explanation. I have been watching this series since some days now and all the topics are properly explained and are easy to understand as well.
00:03 Understanding JavaScript Code Execution
01:56 JavaScript Execution Context is how the script runs and executes code.
05:40 The memory creation phase is the first phase in executing JavaScript code.
07:33 The execution of JavaScript code involves a Global Execution phase and a Memory Creation phase.
11:36 JavaScript executes code by creating separate execution contexts for each function.
13:40 Execution context is where the code is executed and variables are stored.
17:29 Execution context and call stack are key components of JavaScript execution.
19:10 Understanding execution context and call stack in JavaScript
23:03 Execution process in JavaScript involves loading, memory phase, and execution phase
24:44 Executing code and call stack explained
Clear explanations. ❤From Sri Lanka
does srilankans understand hindi
Thanks a lot Hitesh sir. Aise execution aapne samjhaya, I believe no one can. But after watching your video, I can explain it to others. You are right, teaching is an art. :)
sir kuch dino baad ye chaneel , most subsribed in (it) channel hone wala hai ......diamond ho sir aap .
Aap subscribers ka prabandh kro, hum back to back projects n new tech laate h.
Deal rhi ❤️
Nice Explanation, One the Sweetest Teacher in the World. ❤❤
Great teaching style and doesn't feel any boredom watching this
Thanks 😊☕️
Very nice and more informative video for me I never listen about that in my 4 year graduation
Sir I am very thank full to you
You always be happy
Description ho to Hitesh Sir ki video jaisa ho nhi to n ho 😅 wahh kya likhe h
Instagram pe yahn se jaate h .... 😅 Are dada 🙏🏻 superb Sir Literally 😅 u r somthing different but great 😃
That what making this tut standout from other because you're advance concepts in basic and covering all complex concepts in early stage.
This is really an amazing video on javascript. This detailed explanation deserves a ❤. thanks Hitesh sir for bringing this js series to the next level really loving this ❤❤❤
Thanks 😊🥰🥰🥰🥰
Hats-Off for your dedication Sir, You are teaching like a maestro! Thank you and continue the same sir.
Really you are just awesome!!! Even i started React course first but you told first learn JavaScript in depth so just thought to just go through once as i already working in JS. But after starting i take oath that will learn all the small small things also in depth not just to finish things but to know things and that is turning points for me. Thanks a lot for depth course
I am watching this lecture second time and everything is crystal clear
Great Video. Swaad aa gya chai ka video dekhte dekhte!
Best JavaScript tutorials Hitesh Sir
One of the best explanations, made it so easy to understand.
I never watched this type of deep knowledge video in UA-cam. Thank you sir ❤❤
Kafi detailed main sikha sir mja aa gya
Such an epic level of crsytal clear explanation and to the point . This channel is one stop solution for JAVASCRiPT MASTERY !!
In starting JavaScript engine creates call stack.
In call stack => first global execution context is created.
In global execution context => it creates memory phase
In memory phase => it assigns memory to all variables and functions, after completion of memory phase it creates execution phase
In execution phase => it assigns values to the variable and when any function is invoked then it pushed into call stack and new execution context is created when function finishes its execution then it pushed out from the call stack and process goes on.
call stack works on Last In First Out.
So great explanation and love your explanation style
Really hats off for u sir for such a great explanation ...
Thanks a lot for these awesome lectures ..
The way you teach is just wow ..
Love u 3000
osm sir apke liye word nae hai kuch khne ke liye asa smjate ho fir bolte ho comment krne ke liye. smjate hi ase ho ki khi or dhiyan jata hi nae.🥰🥰😇
All Time Favorite Teacher in Javascript. Thank you for this series💛💛
amazing explanation liked it alot but please please make this kind of videos more frequently
I was expecting the indepth content, but This is far beyond my expectation, thanks
➡Creation of the Global Execution Context:
When a JavaScript program starts running, it creates the global execution context. This context consists of two phases: the memory phase and the execution phase.
➡Memory Phase:
During the creation phase, the JavaScript engine sets up the global object (which is the window object in a browser environment), the 'this' keyword, and the outer environment reference.
It also scans through the code and sets up memory space for variables and functions through a process called "hoisting." Variables are set to undefined, and functions are stored in their entirety.
➡Execution Phase:
After the creation phase, the execution phase begins. This is where the actual code is executed line by line.
➡Function Execution:
When a function is called, a new execution context is created for that function. This includes its own memory space for variables and parameters.
The function goes through its own creation and execution phases.
After the function finishes executing, its execution context is popped off the call stack.
➡Call Stack:
The call stack is a data structure that keeps track of the execution context of the program. It follows the Last In, First Out (LIFO) principle.
As functions are called, their execution contexts are added to the top of the call stack.
When a function completes its execution, its context is removed from the top of the call stack.
➡Global Execution Completion:
Once the global execution context completes, the program finishes its execution.
📝Note: the returned value being passed to the global environment, it's more accurate to say that the returned value is passed to the calling context. If a function is called within another function, the returned value is typically used in the context of the calling function.
Great video Hitesh sir.
correct me if something wrong in above text.
sir video me mera yahi doubt reh gya tha functional execution bataye toh par kya hota hai kab use hota hai pta nhi
Amaing content ! Pehli baar js sikh rha hu , wow haven't learnt any programming language with this much depth !
i have come across alot of youtube channels but the way this guy is teaching us Hats Off for you sir love fom pakistan❤
sir aapne 1 hi video me javascript ka saara darr dur karwa diya.
now i am feeling more confident in js.
now i know how things work
top notch content with soft voice..
you are awesome sir.
you are just amazing sir!!! keep doing more video...much love
This was such a good video, it took me 2 times to completely understand the topic. I made sure to take notes this time, it helps a lot, at least in my case. Thank you for existing 😁
my life is sorted now 😴 , Thank you so much sir for this amazing video , Love from Rajasthan ❤
This series is next level thanks for providing this excilent content free❤❤❤❤❤
Thank you so much sir ji 😊😊 Pure UA-cam pe sabse best series hai JS ka😇😇
"This course is absolutely awesome! The content is top-notch, presented in a way that's both engaging and easy to understand. Kudos to the creator for breaking down complex concepts so simply. Truly a gem for anyone looking to grasp the topic effortlessly!"
React bi start kar le chai k sath please
I was following many UA-camrs for learning. But here is something special each and everything going in-depth, I like it, Thank you for such a great videos and sharing appericiable knowledge.🥰😍🤩
Really amazing bhaiya it Really gives the understanding of the topic crystal clear ❤❤❤
Wah Kya Baat hai sir Bohut he Sundar tariqi se samjaya Aff ne😘😘