How Javascript Works and Execution Context?

Everything in Javascript happens inside an execution context.
Execution Context is a container where whole javascript code is executed.
Execution Context has two components:
1)Memory Component 2)Code Component
Memory Component is also known as variable…


This content originally appeared on DEV Community and was authored by Magnus

Everything in Javascript happens inside an execution context.
Execution Context is a container where whole javascript code is executed.
Execution Context has two components:
1)Memory Component 2)Code Component
Memory Component is also known as variable environment*
*Code Component is also known as Thread of Execution
Execution Context Diagram
⭐In Memory component all the variables and functions are stored
as a key-value pairs.

⭐In Code Component code are executed one line at a time.

Note:Javascript is a Synchronous single Threaded Language
*Synchronous means in order.
*Single Threaded means one command processes at a time.

Reference:@akshaymarch7


This content originally appeared on DEV Community and was authored by Magnus


Print Share Comment Cite Upload Translate Updates
APA

Magnus | Sciencx (2021-11-22T18:46:14+00:00) How Javascript Works and Execution Context?. Retrieved from https://www.scien.cx/2021/11/22/how-javascript-works-and-execution-context/

MLA
" » How Javascript Works and Execution Context?." Magnus | Sciencx - Monday November 22, 2021, https://www.scien.cx/2021/11/22/how-javascript-works-and-execution-context/
HARVARD
Magnus | Sciencx Monday November 22, 2021 » How Javascript Works and Execution Context?., viewed ,<https://www.scien.cx/2021/11/22/how-javascript-works-and-execution-context/>
VANCOUVER
Magnus | Sciencx - » How Javascript Works and Execution Context?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/11/22/how-javascript-works-and-execution-context/
CHICAGO
" » How Javascript Works and Execution Context?." Magnus | Sciencx - Accessed . https://www.scien.cx/2021/11/22/how-javascript-works-and-execution-context/
IEEE
" » How Javascript Works and Execution Context?." Magnus | Sciencx [Online]. Available: https://www.scien.cx/2021/11/22/how-javascript-works-and-execution-context/. [Accessed: ]
rf:citation
» How Javascript Works and Execution Context? | Magnus | Sciencx | https://www.scien.cx/2021/11/22/how-javascript-works-and-execution-context/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.