Section 1Notes
Quick notes are visible here first. Each note also links out to the Medium blog for deeper reading.
JavaScript runs one call stack per thread, then coordinates asynchronous work through queues.
- Synchronous code runs first on the call stack.
- Promise callbacks run in the microtask queue before timer callbacks in the macrotask queue.
- Long CPU work blocks rendering and I/O callbacks, so split work or move it to a worker.
Open Medium noteA closure lets a function remember variables from the scope where it was created.
- Closures power function factories, memoization, modules, callbacks, and private state.
- They can also accidentally retain memory if long-lived callbacks capture large objects.
- In loops, let creates a new binding per iteration while var shares a function-scoped binding.
Open Medium noteJavaScript inheritance is prototype-based; class syntax is a cleaner layer on top of prototypes.
- Property lookup checks the object first, then climbs the prototype chain.
- Arrow functions do not bind their own this, arguments, or super.
- Use composition when inheritance makes behavior harder to reason about.
Open Medium noteSection 2Interview Questions
Filter by category, search the answers, mark reads, and keep only the questions that matter right now.