JavaScript Tutorial Part 2 - Execution Context and The Call Stack

preview_player
Показать описание
JavaScript Tutorial For Beginners

Execution Context and the Call Stack in JavaScript are explained in this relatively trivial tutorial. First, recognize that the global scope is nothing more than an instance of the main Window() object. The "this" keyword, and variable environment are used to juggle around data inside the lexical environment of a particular scope.

Basically, every time a function is called, a new execution context is created. An execution context is composed from the Lexical Environment of the scope it is in, the Variable Environment and "this" keyword binding. The this keyword will refer to the object, of the scope from which the function was called. However, when an object literal is used, or the function is used to instantiate a new object using the "new" operator, then the function will create its own this / execution context. You can chain execution contexts, as they are placed on the main Call Stack. When the function returns, the execution context is removed from the top of the Call Stack.

Self-education + Computer Literacy
For next generation of teachers,
artists, coders, designers, and makers of things:
Рекомендации по теме
Комментарии
Автор

THIS IS HONESTLY THE BEST BY FAR, THE BEST TUTORIAL I HAVE WATCHED, I have paid for many tutorials online, watched and listen to many but this explains the core concept clearly. God has use you greatly. THANK YOU, THANK YOU, THANK YOU. to God be the glory. It you can do a tutorial on Javascript LOGIC, it will be really great. the logic could explain how a particular logic works. eg todo list. the logic of building any apart which is different for different apps. Thanks again

abahiduh
Автор

Great tutorial. And thank goodness no wix or udemy ads!

candiLove
Автор

I've watched some other videos on this topic that were exceptional in their own ways -- and you were exceptional in yours. On top of that -- you closed a couple gaps in my understanding (and enhanced some other points as well). So thank you very much for your fine work here!

rickmemmer
Автор

Thank you so much! This is very useful. I'm not a native english speaker but I understood you perfectly. Great tutorial.

mesherodriguez
Автор

You are my Master - I've never seen that kind of explanation of JS ! SPLENDID = merci !

justyna
Автор

It’s really helpful ^^. Thanks for the great explanation, sir.

vongvisalsambath
Автор

Thank you for your second chapter in your tutorial series
You present the key concepts and explain them clearly
I like your teaching method :)

Which program do you use for your graphics, if I may ask?

sergiomartin
Автор

Thanks for this video! What tool did you use to create that diagram?

chase-bank
Автор

You are amazing. Thank you for your hard work!

metasavagex
Автор

10:25 onwards - "...if you call any functions from that constructor, they would inherit whatever that "this" object would be..."
isn't that incorrect?
Even if "a" is called with "new a()" the "this" in "b" called from "a" won't refer to the new object, but rather the window object itself.

rahulcyadav
Автор

another nice lecture, , , please convert you dont know js book to be videos

MrKaremnour
Автор

Document.write("You got subscriber");

yashrajbasan