Skip to content

Latest commit

 

History

History
63 lines (53 loc) · 2.21 KB

File metadata and controls

63 lines (53 loc) · 2.21 KB

🟨 How JavaScript Works Internally

This repository provides a deep dive into how JavaScript works under the hood. It includes detailed diagrams (created using tldraw) and code examples.

Table of Contents

How js work pdf

  1. High level overview of JavaScript
  2. JavaScript Engine
  3. Components of JavaScript Engine
  4. Compilation and Interpreter Working Process
  5. Call Stack Deep Dive
    1. Global Execution Context
      1. Variable Environment
      2. Scope Chain
      3. This Keyword
    2. Execution Context
  6. Deep dive inside Execution Context
    1. Variable Environment

    2. Scope Chain

      1. Type Scope

        1. Global Scope
        2. Function Scope
        3. Block Scope

        Only variable lookup scope chain is allowed

    3. This Keywords

      1. this in normal function calling
      2. this in methods calling
      3. this in arrow function
      4. this in event listener

      this never points to itself or the variable environment

      1. call()
      2. apply()
      3. bind()
    4. Arguments keywords in Execution Context

    5. Memory Management Life Cycle

      1. Memory Allocation
        1. Call Stack
        2. Heap Memory
    6. Shallow copy and Deep copy

    7. Garbage Collection

      1. Mark and Sweep algorithms
  7. Interview Questions

Resources