Week 4 — Async Mastery & Objects

intermediate javascript dbms dsa

Goal: Go deeper on async JavaScript (event loop is a favorite interview topic), understand JS objects and inheritance, and round out foundational DBMS + DSA knowledge.

Topics

DayFocusTopics
MonJS Async MasteryError Handling · Event Loop · Debouncing & Throttling
TueJS Objects & OOPObjects · Prototypal Inheritance · Classes
WedDBMS TheoryBASE Properties · CAP Theorem
ThuDBMS Advanced SQLSubqueries & CTEs · Window Functions
FriDSA Sorting & ListsSorting Algorithms · Linked Lists

Key Concepts

  • Event loop phases: call stack, microtask queue (promises), macrotask queue (setTimeout) — the order matters
  • Debounce vs throttle: both limit function calls, but in very different ways
  • Prototype chain lookup — how JS finds properties you didn’t define on an object
  • class syntax vs constructor functions — syntactic sugar, same prototype mechanics underneath
  • CAP theorem tradeoffs — you can only pick two, and the choice shapes your architecture
  • Merge sort (stable, O(n log n) guaranteed) vs quick sort (in-place, O(n log n) average)
  • Linked list pointer manipulation — reversing, detecting cycles, finding middle

Practice

  • Predict event loop output for 3 code snippets mixing setTimeout, Promise, and queueMicrotask
  • Implement debounce and throttle from scratch — both are common interview asks
  • Reverse a linked list iteratively and recursively
  • Write a window function query to rank employees by salary within each department

~12 topics · ~1.5 hrs/day · Focus: read the linked notes, then code each concept