✍️ Content byMd. Rakibul Islam
1

Design a memory-efficient caching mechanism using WeakMap and explain why WeakRef alone isn't always sufficient.

β†’
2

How would you architect a system to avoid microtask starvation in a high-throughput Node.js application?

β†’
3

Compare Symbol-based property hiding with ES2022 private class fields (#field) β€” when would you architecturally choose one over the other?

β†’
4

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.

β†’
5

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?

β†’
6

Critique the design trade-offs of JavaScript's automatic semicolon insertion (ASI) and explain a real production bug it can cause.

β†’
7

Describe a scenario where using `for...of` with `await` (async iteration) is necessary. How does it differ from `Promise.all`?

β†’
8

How does JavaScript's event loop interact with `while` loops? Why does a synchronous infinite loop freeze the browser?

β†’
9

What are some common performance pitfalls in JavaScript loops and how do you avoid them?

β†’
10

How would you implement a `range` function and use it with `for...of`? What is the iterator protocol?

β†’
11

What is the difference between a `switch` expression and a `switch` statement? (ES2025 proposal context)

β†’
12

What is function currying? Can you implement a simple curry function?

β†’
13

What is tail call optimization and does JavaScript support it?

β†’
14

Can closures cause memory leaks? Explain how and how to avoid it.

β†’
15

How would you implement a memoization function using closures?

β†’
16

How do closures enable the debounce and throttle patterns? Implement a simple debounce function.

β†’
17

What is the module pattern in JavaScript and how does it use closures and IIFEs together?

β†’
18

Explain how the `this` keyword is resolved in JavaScript, covering all four binding rules: default, implicit, explicit, and new binding.

β†’
19

How would you implement a deep equality check between two objects from scratch, without using any library?

β†’
20

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

Javascript MOCK Interview Questions β€” All Levels | UyTech