Read: Class 03 (Async) - Goorob-401-advanced-javascript/amman-javascript-401d1 GitHub Wiki
V8 is the name of the runtime used in the Chrome web browser and in Node.js
Hoisting : variable and function declarations get “hoisted” to top of your code before it runs. When the Javascript
runtime executes your code after reorganizes what you have written .
The Call Stack : V8 has a single Call Stack , only one function can be running at a time , every synchronous function that is called is pushed onto a stack in V8 .
The Callback Queue : Functions stored on the callback queue are not executing, they are only waiting to be put onto the call stack.
when asynchronous function is invoked ,it is pushed onto the V8 call stack , the function makes a call to a browser/Node.js API and passes on a callback. Then the function returns and is popped off of the call stack .