2dbi

JavaScript and React Core Concepts

viaLeetCode

Prompt Deep-dive on JavaScript language fundamentals and React, including implementing a promise from scratch.

Be ready to discuss

  • Promises: states (pending/fulfilled/rejected), then-chaining semantics, error propagation; IMPLEMENT a minimal Promise (executor, state machine, callback queues for pending thens, asynchronous resolution per spec) — the marquee exercise here.
  • Closures: lexical scope capture, the loop-variable classic (var vs let in setTimeout loops), module/factory patterns, memory implications.
  • Hoisting & TDZ: var hoisting vs let/const in the temporal dead zone; function declarations vs expressions.
  • async/await: sugar over promises, sequential-vs-parallel pitfalls (await in loops vs Promise.all), error handling with try/catch.
  • Currying (manual + generic curry(fn)), strict mode effects, let vs const semantics (const = binding immutability, not value immutability).
  • React: hooks rules and mental model (useState, useEffect deps and cleanup, useMemo/useCallback), class vs functional components (lifecycle mapping to effects), state vs props, controlled components, why keys matter in lists.
Add a follow-up question they asked
No follow-ups yet. Be the first to add one.
asked …
LeaderboardSalary
Language
Account