singularity

Execution contexts

1. Global execution context

2. Function execution context

Execution context phases

Execution contexts have following two phases:

Creation phase

Lexical and Variable environments

Lexical environment
Variable environment
let name = "Jane Doe";
var age = 20;

function introduce(name, age) {
  console.log("Hello, I am " + name + " and I am " + age + " years old");
}

Lexical and Variable environments

Execution phase

Stack overflow

Automatic garbage collection