Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 750 Bytes

File metadata and controls

11 lines (8 loc) · 750 Bytes

Episode 1 : Execution Context

Everything in JS happens inside the execution context.

Assume execution context to be a big box where everything takes place. It has 2 components in it:

  • Memory : The place where all the variables and functions are stored as (key:value) pairs. Memory component is also known as variable environment.
  • Code : The place where code is executed one line at a time. Code component is also known as Thread of Execution

    JS is a synchronous single-threaded language.

  • By single threaded, we mean JS can only run 1 command at a time
  • By synchronous single threaded, we mean it can run 1 command at a time, in a specific order