Design a memory-efficient caching mechanism using WeakMap and explain why WeakRef alone isn't always sufficient.
How would you architect a system to avoid microtask starvation in a high-throughput Node.js application?
Compare Symbol-based property hiding with ES2022 private class fields (#field) β when would you architecturally choose one over the other?
Explain how V8's deoptimization cycle can silently degrade performance in a long-running Node.js service, and how would you detect it in production.
How would you design a robust equality-checking utility for a large codebase that needs to handle NaN, -0, BigInt, and deeply nested objects correctly β and why is Object.is() not always sufficient?
Critique the design trade-offs of JavaScript's automatic semicolon insertion (ASI) and explain a real production bug it can cause.
Describe a scenario where using `for...of` with `await` (async iteration) is necessary. How does it differ from `Promise.all`?
How does JavaScript's event loop interact with `while` loops? Why does a synchronous infinite loop freeze the browser?
What are some common performance pitfalls in JavaScript loops and how do you avoid them?
How would you implement a `range` function and use it with `for...of`? What is the iterator protocol?
What is the difference between a `switch` expression and a `switch` statement? (ES2025 proposal context)
What is function currying? Can you implement a simple curry function?
What is tail call optimization and does JavaScript support it?
Can closures cause memory leaks? Explain how and how to avoid it.
How would you implement a memoization function using closures?
How do closures enable the debounce and throttle patterns? Implement a simple debounce function.
What is the module pattern in JavaScript and how does it use closures and IIFEs together?
Explain how the `this` keyword is resolved in JavaScript, covering all four binding rules: default, implicit, explicit, and new binding.
How would you implement a deep equality check between two objects from scratch, without using any library?
What are the performance implications of using array methods like map(), filter(), and reduce() chained together versus a single for loop, especially on large datasets?
Showing 1β20 of 86 questions