Русские видео

Сейчас в тренде

Иностранные видео


Скачать с ютуб The ULTIMATE guide to JavaScript Execution Contexts 🔥 в хорошем качестве

The ULTIMATE guide to JavaScript Execution Contexts 🔥 1 год назад


Если кнопки скачивания не загрузились НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу страницы.
Спасибо за использование сервиса savevideohd.ru



The ULTIMATE guide to JavaScript Execution Contexts 🔥

Javascript - Execution Context|Lexical Environment 00:07 Execution Context 08:29 Lexical Environment 13:55 Hoisting 24:40 Exercise Hoisting 28:34 Exercise Hoisting 2 how do we run code in JavaScript well we assign variables and then we run functions right that's all we really do in a language so take a look at the code over here every time we run a function let's say if we call the say my name function we add these brackets to it and then we're able to execute that function or run it the JavaScript engine is going to look at this and say aha here's a task for me tell me what to do Mr function and as soon as the JavaScript engine sees these brackets it's going to create something called an execution context but we'll get to that in a second if we run this function say my name is going to be run which is going to return find name which is going which is going to return print name which is going to return my name all right that's a pretty convoluted way of doing things but if I run this we see that it prints Andre nagway so what is happening here well when the JavaScript engine sees those brackets it's going to say oh I'm going to run a function and create an execution context so the first thing it does is create an execution context say my name and add this execution context onto the stack remember our call stack right and then it tries to run this function and sees that oh this function is calling another function so I'm going to create a new execution context because I'm going to see these brackets that's called find my name and there we have it another item that gets pushed onto the stack and then that function once the script engine is going to see oh here's another bracket pair of brackets print name let's run this function and then this function after it's created its own execution context is going to return the string Andre nagway which gets returned to find my name which gets returned to say my name and then eventually the call stack all gets popped off and we return onto the screen Andre nagway it's really weird saying my own name while doing this next time I'm going to pick a different name so if we take a look back onto our code this should make sense we're adding items onto the call stack which we've talked about before but this time I've introduced to you this idea of execution context now before we get into exactly what this execution context means I may have lied to you the diagram that we just saw isn't a hundred percent accurate 100 accurate because the base execution context that runs is called the global execution context this is what I mean initially our JavaScript engine is going to create a global execution context we don't see this it's underneath the hood but it's saying hey here's the Javascript file for you just start reading it for me and on top of that that's when we start adding say my name then find my name then print name and then eventually as these execution contexts get popped off the last thing that remains is the global execution context and when the final line of our code runs and we're done with the JavaScript engine THANKS FOR WATCHING AND DON'T FORGET TO LIKE, COMMENT, SUBSCRIBE, AND HIT THE BELL ICON TO WATCH THE LATEST VIDEO! #edudreams #js #javascript ~-~~-~~~-~~-~ Please watch: "String manipulation in Python #codingtutorial #python #programminglanguage #coding"    • Make Python Work For You! Master Stri...   ~-~~-~~~-~~-~

Comments