JavaScript Tutorial Part 2 - Execution Context and The Call Stack

Veröffentlicht am: 09 November 2018
auf dem Kanal: Ghost Together
6,476
241

JavaScript Tutorial For Beginners

Learning Curve Books: http://www.learningcurvebook.net
Follow on Twitter:   / js_tut  
Instagram:   / javascriptteacher  
Facebook:   / javascriptteacher  

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:
Learning Curve Books: http://www.learningcurvebook.net


Auf dieser Seite können Sie das Online-Video JavaScript Tutorial Part 2 - Execution Context and The Call Stack mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Ghost Together 09 November 2018 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 6,476 Mal angesehen und es wurde von 241 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!