THN Interview Prep

JavaScript (ES6+)

JavaScript is a dynamic, single-threaded language characterized by its prototype-based model and async execution capabilities.


33 JavaScript Concepts (SDE-3 Deep Dives)

We have compiled a comprehensive reference guide covering all 33 JavaScript Concepts required for SDE-3 / Senior / Lead engineer interviews. Each section details language specifications, browser/Node execution models, V8 engine internals, performance optimizations, and code examples.

📚 Study Track & Sections

  1. Fundamentals
    Call Stack, Primitive Types, Value vs. Reference, Type Coercion, Equality Operators, and Lexical Scope & Closures.

  2. Execution Mechanics
    Event Loop (libuv), Modules (ESM vs. CommonJS), V8 Engine Internals, Timers, and Bitwise & Typed Arrays.

  3. Web Platform & APIs
    Critical Rendering Path (CRP), DOM & Layout Trees, Fetch API (Response Streams & AbortController), and Web Workers.

  4. Object-Oriented JS
    Factories vs. Classes, Context Binding (this, call, apply, bind), new operator mechanics, and Prototype Chain delegation.

  5. Async JS
    Callbacks, Promise executor synchronicity, Promise combinators, async/await state-machine compilation, and Generators & Iterables.

  6. Advanced JS & CS
    V8 memory arrays (Fast vs. Dictionary elements), Big O Complexity, Sorting algorithms (Timsort), Design Patterns (Pub-Sub), functional currying/piping, and Clean Code standards.


Core Concepts (Quick Reference)

  • Closures: Functions retaining reference pointers to outer scopes.
  • Hoisting: Variable and function registrations during compiler's creation phase.
  • Event Loop: Single-threaded concurrency driver offloading operations to host APIs.
  • Prototypes: Delegation chain linking all objects back to Object.prototype.

How it works internally

Execution context, call stack, task queues, and V8's JIT compiler.

Trade-offs

  • Single-threaded model: Simplified state management, but CPU-bound tasks block execution.
  • Async complexity: Managing callbacks, Promises, or async operations requires clean error boundary definitions.

Interview Focus

  • Async execution flow
  • Memory leaks (closures, DOM leaks, unmanaged event listeners)
  • JIT compilers and performance-critical loops

Mark this page when you finish learning it.

Spotted something unclear or wrong on this page?

On this page