Skip to content

Ashukr321/How_Javascript_Work_Internally

Repository files navigation

🟨 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

  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

About

This repository is a comprehensive deep dive into the internal workings of JavaScript. It transitions from high-level concepts to the low-level execution logic of the JS Engine, providing a roadmap for developers who want to master the "magic" behind the code.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors