Skip to content

Commit d86a91c

Browse files
committed
EP 1 & 2
1 parent 473b630 commit d86a91c

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

Ep 1/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
JavaScript is a synchronous single-threaded language.
2+
When script is run an execution context is created. It contains two blocks:
3+
One memory block and second code block.
4+
Memory block contains all the variables and functions as key value pairs and code blocks is where all the code is executed line by line.
5+
Memory block is also called environment variable and the code block is known as thread of execution.

Ep 2/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
JavaScript execution phase-- Memory and Code component
2+
3+
In Memmory Creation, JavbaScript allocates the memory for the variable(stores undefined) and function(stores whole fn code).
4+
5+
In Code Creation, JavaScript creates the code for the variable and function invocation(starts new JS execution for fn).
6+
7+
Call Stack is a data structure that stores the function calls. It is a {Stack} LIFO (Last In First Out)
8+
9+
For example Global execution context is the top of the call stack. When a function is called, it is pushed onto the call stack . When the function returns, it is popped from the call stack.
10+
At the end when whole code is executed, the call stack is empty.
11+
12+
#Call Stack maintains the order of execution of execution contexts.
13+
Call stack maintains the order of function calls. It is used to keep track of the current function call. It is used to prevent recursive function calls from causing a stack overflow.
14+

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy