JavaScript & Node.js Interview Questions

100 realistic questions with model answers and the insider read: what they’re actually scoring. Modeled on interview loops at Netflix, PayPal, Uber, LinkedIn & Shopify.

6 free answers: click any question to read the model answer + what they’re actually scoring
> filter: 100/100
javascript-fundamentals1 free ↓
01
What's the difference between == and === in JavaScript?
Tests whether you understand type coercion and can explain when implicit type conversion produces surprising results.
free
The double equals operator performs type coercion before comparing: if the two values have different types, JavaScript converts one to match the other before checking equality. Triple equals, the strict equality operator, skips that conversion and returns false if the types differ. In practice I default to === everywhere because the coercion rules for == are complex enough that even experienced developers get them wrong: 0 == false is true, null == undefined is true, but null == false is false. The only case where I reach for == intentionally is a null check like value == null, which catches both null and undefined in one expression without any other surprises.
Insider read
Really testing: Whether the candidate understands that == triggers the Abstract Equality Comparison algorithm with multi-step coercion rules, not just that the two operators differ. Interviewers score whether you give a concrete example of a coercion result that surprises working engineers.
The tell: Juniors say '=== is safer so always use it.' Seniors explain the coercion algorithm, name a specific surprising case like 0 == false or [] == false, and mention the one legitimate use of ==: null checks that catch both null and undefined in one expression.
Follow-up: "If [] == false is true, what does [] == ![] evaluate to and why?"
Say this"My default is === everywhere, but I keep one exception: value == null is the cleanest way to check for both null and undefined at once, and I use it deliberately, not by accident."
02
What's the difference between var, let, and const?
Tests whether you know that all three are hoisted but behave differently in scope, initialization, and reassignment.
Full answer + insider read in the complete set.Unlock all 100 · $19
03
How does hoisting work in JavaScript, and what are the practical gotchas?
Tricky because function declarations and variable declarations are hoisted differently, and the temporal dead zone for let and const catches candidates off guard.
Full answer + insider read in the complete set.Unlock all 100 · $19
04
How do closures work in JavaScript, and where do you actually use them in production?
Tests whether you can explain that a closure captures a reference to the variable binding, not a snapshot of the value, and give a concrete production use case.
Full answer + insider read in the complete set.Unlock all 100 · $19
05
How does the value of this get determined in JavaScript?
Tricky because this is resolved at call time, not definition time, except for arrow functions, which capture it lexically at definition time.
Full answer + insider read in the complete set.Unlock all 100 · $19
06
What is lexical scope and how does the scope chain work in JavaScript?
Tests whether you understand that variable resolution is determined by the source code structure, not the runtime call site, and can trace how the engine walks the scope chain.
Full answer + insider read in the complete set.Unlock all 100 · $19
07
How does prototypal inheritance work in JavaScript, and how do ES6 classes relate to it?
Tests whether you know that ES6 classes are syntactic sugar over the prototype chain, not a separate inheritance model.
Full answer + insider read in the complete set.Unlock all 100 · $19
08
What does typeof null return and why does it return that?
Tricky because the result looks like a bug, and it is a historical bug, but explaining it reveals how JavaScript's internal type tags work.
Full answer + insider read in the complete set.Unlock all 100 · $19
09
When do you reach for map versus forEach versus reduce on an array?
Tests whether you understand the semantic intent of each method, not just the callback syntax.
Full answer + insider read in the complete set.Unlock all 100 · $19
10
How does destructuring work in JavaScript, and what are the advanced patterns worth knowing?
Tests whether you can explain aliasing, default values, and rest patterns, not just the basic syntax.
Full answer + insider read in the complete set.Unlock all 100 · $19
11
What is the difference between ES modules and CommonJS in Node.js?
Tests whether you understand that the two systems have fundamentally different loading models, not just different syntax.
Full answer + insider read in the complete set.Unlock all 100 · $19
12
How do you enforce immutability in JavaScript, and what are the limits of each approach?
Tests whether you know the difference between preventing reassignment with const, shallow freezing with Object.freeze, and deep immutability patterns.
Full answer + insider read in the complete set.Unlock all 100 · $19
13
What is a WeakMap and when would you actually use one over a regular Map?
Tests whether you understand that WeakMap holds its keys by weak reference and can explain the memory management consequence of that.
Full answer + insider read in the complete set.Unlock all 100 · $19
14
What are JavaScript's falsy values and how does type coercion produce surprising results in conditional logic?
Tricky because most candidates list the falsy values correctly but miss how the Abstract Equality algorithm produces counterintuitive results with arrays and objects.
Full answer + insider read in the complete set.Unlock all 100 · $19
15
What are generators, and when would you actually reach for one?
Tests whether you can name a real production use case beyond textbook fibonacci, or whether generators are trivia to you.
Full answer + insider read in the complete set.Unlock all 100 · $19
16
What is the difference between null and undefined in JavaScript, and when should you use each?
Tests whether you know that undefined is the runtime's signal for unset state and null is the programmer's explicit signal for intentional absence.
Full answer + insider read in the complete set.Unlock all 100 · $19
17
How does async/await work under the hood, and what happens to the call stack during an await?
Tests whether you know that async functions return Promises and that await suspends the function's execution without blocking the thread.
Full answer + insider read in the complete set.Unlock all 100 · $19
async-event-loop1 free ↓
18
Explain the event loop like I'm a new hire.
Tests whether you can reduce a core runtime mechanism to a plain mental model without losing the one detail that trips most engineers up.
free
I picture the event loop as a single-threaded waiter in a restaurant. The waiter takes one order, hands it to the kitchen (the OS), and immediately turns back to take the next order. When the kitchen is done, it rings a bell and the callback enters the task queue. The waiter finishes what it is currently doing, then picks up the next queued item. That is Node.js in one image: one thread, non-blocking I/O, callbacks queued by the OS. The subtle part is the microtask queue: resolved Promises and queueMicrotask callbacks drain completely before the event loop moves to the next macrotask. So long-running microtask chains can still stall the loop even when no I/O is blocked.
Insider read
Really testing: Whether you can reduce a runtime mechanism to a mental model without waving away the tricky part. The microtask drain behavior is what separates a surface understanding from a working one.
The tell: Juniors say 'Node is non-blocking so it handles concurrency with callbacks.' Seniors describe the call stack, the task queue, the microtask queue, and note that microtasks drain fully before the next macrotask, which is the source of most async ordering bugs.
Follow-up: "If I resolve a Promise and call setTimeout(0) in the same tick, which callback runs first?"
Say this"The event loop is not magic concurrency. It is a single thread that stays busy because I/O waits are handed off to the OS and reported back via queued callbacks."
19
What is the difference between microtasks and macrotasks, and why does the order matter?
Tests whether you know the two-queue model well enough to predict execution order when Promises and timers are mixed in the same code.
Full answer + insider read in the complete set.Unlock all 100 · $19
20
What is the real difference between callbacks, Promises, and async/await, and when do you still reach for callbacks?
Tests whether you understand that async/await is syntactic sugar over Promises and that callbacks remain necessary at certain API boundaries.
Full answer + insider read in the complete set.Unlock all 100 · $19
21
When do you reach for Promise.all versus Promise.allSettled versus Promise.race?
Tests whether you match the combinator to the error handling contract the caller actually needs, not just whether you know all four exist.
Full answer + insider read in the complete set.Unlock all 100 · $19
22
What happens when a Promise rejection goes unhandled in Node.js, and how do you prevent it?
Tests whether you know how Node.js crash behavior changed in version 15 and how to design rejection-safe Promise chains.
Full answer + insider read in the complete set.Unlock all 100 · $19
23
What does blocking the event loop actually mean, and how do you detect it in production?
Tests whether you understand that synchronous CPU-bound work is the culprit and can name concrete tools for measuring loop lag.
Full answer + insider read in the complete set.Unlock all 100 · $19
24
What is the execution order of process.nextTick, Promise callbacks, setTimeout(0), and setImmediate?
Tricky because the order depends on where in the event loop phase the call is made, and most engineers guess wrong on nextTick versus Promise ordering.
Full answer + insider read in the complete set.Unlock all 100 · $19
25
When would you use for-await-of instead of Promise.all?
Tests whether you understand that for-await-of consumes values lazily and is the right tool when you cannot or should not load all values into memory at once.
Full answer + insider read in the complete set.Unlock all 100 · $19
26
When do you reach for worker_threads versus child_process in Node.js?
Tests whether you understand that workers share memory with the main process and suit CPU-bound tasks, while child processes provide isolation for running separate executables.
Full answer + insider read in the complete set.Unlock all 100 · $19
27
What is backpressure in Node.js streams and how do you handle it correctly?
Tests whether you understand that a fast readable paired with a slow writable causes memory growth and that pipeline handles the signaling automatically.
Full answer + insider read in the complete set.Unlock all 100 · $19
28
How does AbortController work, and when do you actually reach for it?
Tests whether you understand AbortController as a cancellation propagation mechanism and can describe real scenarios where it replaces ad-hoc timeout patterns.
Full answer + insider read in the complete set.Unlock all 100 · $19
29
What are the practical implications of top-level await in Node.js ES modules?
Tests whether you understand that top-level await blocks the importing module and that this changes module graph evaluation order in ways that can delay server startup.
Full answer + insider read in the complete set.Unlock all 100 · $19
30
How do you write async Node.js code that is actually testable?
Tests whether you understand dependency injection and clock control as the tools for deterministic async tests, not just whether you know how to use async/await in a test runner.
Full answer + insider read in the complete set.Unlock all 100 · $19
31
How do you control concurrency when you need to run many async operations at once?
Tests whether you know that Promise.all with no limit can saturate downstream resources and can describe a semaphore or pool-based approach.
Full answer + insider read in the complete set.Unlock all 100 · $19
32
How do you handle errors in async/await code without losing stack traces or swallowing context?
Tests whether you know that fire-and-forget async calls silently discard rejections and that cause chaining preserves the original error without losing context.
Full answer + insider read in the complete set.Unlock all 100 · $19
33
What does libuv actually do for Node.js, and what is the thread pool used for?
Tests whether you understand that Node.js non-blocking I/O relies on OS-level async APIs and that libuv uses threads only as a fallback for operations with no async OS equivalent.
Full answer + insider read in the complete set.Unlock all 100 · $19
34
How do you retry failed async operations without making things worse?
Tests whether you know that naive retries amplify outages, and that idempotency decides what is retryable at all.
Full answer + insider read in the complete set.Unlock all 100 · $19
node-runtime1 free ↓
35
Why is Node.js fast for I/O-heavy workloads but wrong for CPU-heavy ones?
Tests whether you can explain the single-threaded event loop model without reciting a textbook definition, and whether you know the exact failure mode for CPU work.
free
Node.js runs JavaScript on a single thread, and its speed for I/O comes from a simple principle: instead of blocking while waiting for a disk read or network response, it registers a callback and moves on. libuv handles the actual I/O asynchronously under the hood, queuing completions back onto the event loop. The thread is almost always free to take new work, which is why a single Node process can handle thousands of concurrent connections with very little memory. The catch is CPU: if I run a tight computation loop, I monopolize that one thread and nothing else runs. For CPU-heavy work I move the task to a worker thread or a separate process, keeping the event loop free for the I/O the runtime was designed for.
Insider read
Really testing: Whether you understand the model at the mechanism level, not just the marketing level. Interviewers want to hear 'single thread,' 'event loop,' and 'blocking' as connected ideas with a concrete consequence.
The tell: Juniors say 'Node is fast because it's non-blocking.' Seniors explain what is doing the actual waiting (libuv), what non-blocking means for the thread, and exactly why that model breaks down for CPU-bound tasks.
Follow-up: "What happens to all incoming HTTP requests while Node is busy computing a large Fibonacci sequence?"
Say this"The single thread is both the feature and the bug. For I/O you never actually need the thread; you just need to know when the data is ready. For CPU you need the thread the whole time, and that blocks every other request."
36
How do EventEmitters work, and where do they bite you in production?
Tests whether you know emit is synchronous and can name the classic leak and error pitfalls, not just the on/emit API.
Full answer + insider read in the complete set.Unlock all 100 · $19
37
Sync, callback, or promise: how do you choose between Node's file system APIs?
Tests whether you understand what sync I/O does to the event loop and where the legitimate exceptions are.
Full answer + insider read in the complete set.Unlock all 100 · $19
38
What is a Buffer in Node.js and when do you reach for one over a string?
Tests whether you understand the memory model difference between Buffer and string, not just that Buffers exist for binary data.
Full answer + insider read in the complete set.Unlock all 100 · $19
39
What is the difference between the cluster module and worker_threads?
Tests whether you understand the isolation boundary of each approach and can choose the right tool based on what the task actually requires.
Full answer + insider read in the complete set.Unlock all 100 · $19
40
How do you manage Node.js heap limits and avoid out-of-memory crashes?
Tests whether you know the default is not always correct, how to tune it for containers, and what to do when heap grows steadily.
Full answer + insider read in the complete set.Unlock all 100 · $19
41
How does V8 garbage collection work and what can you do to help it?
Tests whether you know the generational model well enough to reason about what triggers a major GC pause, not just that GC exists.
Full answer + insider read in the complete set.Unlock all 100 · $19
42
How do you manage environment configuration across dev, staging, and production?
Tests whether you have a principled approach to config management rather than ad-hoc environment files scattered through your repos.
Full answer + insider read in the complete set.Unlock all 100 · $19
43
How do you shut down a Node.js service gracefully on SIGTERM?
Tests whether you know the signal flow from an orchestrator and can describe the drain pattern rather than just saying 'listen for SIGTERM.'
Full answer + insider read in the complete set.Unlock all 100 · $19
44
What is the right way to handle uncaught errors in a Node.js process?
Tests whether you understand the semantics of uncaughtException, know why continuing after one is dangerous, and can place domains historically.
Full answer + insider read in the complete set.Unlock all 100 · $19
45
How does require() resolve a module, and what happens when it finds one?
Tests whether you know the full resolution order and the caching behavior, not just that require loads a file.
Full answer + insider read in the complete set.Unlock all 100 · $19
46
How do you keep your npm dependency tree secure against supply-chain attacks?
Tests whether you understand the supply-chain threat beyond CVE lists, including lockfile discipline and the risks of compromised package accounts.
Full answer + insider read in the complete set.Unlock all 100 · $19
47
How do you keep a dependency tree healthy as a project ages?
Tests whether you treat the dependency tree as a living asset that needs active curation, not a frozen list that grows over time.
Full answer + insider read in the complete set.Unlock all 100 · $19
48
What are the phases of the Node.js event loop and why does the order matter?
Tests whether you can name the phases in order and explain why phase ordering has observable consequences for code behavior.
Full answer + insider read in the complete set.Unlock all 100 · $19
49
What has changed in modern Node that replaces things we used to install?
Tests whether your Node knowledge is current or frozen in the Node 14 era of dotenv and node-fetch for everything.
Full answer + insider read in the complete set.Unlock all 100 · $19
50
What do the exports and imports fields in package.json actually control?
Tests whether you have published or debugged a modern package, or only consumed node_modules blindly.
Full answer + insider read in the complete set.Unlock all 100 · $19
51
How do you profile a Node.js application to find a memory leak or CPU hot spot?
Tests whether you have a concrete profiling workflow rather than a list of tools you have heard of but never actually used.
Full answer + insider read in the complete set.Unlock all 100 · $19
Stop guessing what they're scoring.
// 100 questions · model answers · insider reads · $19 one-time
Unlock all 100 · $19
apis-backend-patterns1 free ↓
52
How do you structure an Express app so it doesn't turn into a mess?
Tests whether you can describe a layered architecture rather than just saying 'use folders' or citing a framework without explaining why the separation matters.
free
I split the app by concern from day one. Routes live in a routes/ folder, each resource in its own file. Business logic lives in a services/ layer that routes call into. Data-access functions live one layer below that. Middleware is registered centrally in app.js and never buried inside route handlers. I keep index.js to a handful of lines: import the app, attach a port, start listening. The rule I enforce on every team is: route handlers should read like a table of contents, not contain logic. If a handler grows past ten lines, something belongs in a service. That structure survives team growth because every new file follows the same pattern automatically.
Insider read
Really testing: Whether you have thought about separation of concerns beyond file organization. Interviewers want to hear a layered mental model: routes, services, data-access, and where each concern lives.
The tell: Juniors say 'I organize by feature folder.' Seniors describe a layered architecture with explicit contracts between layers, explain why business logic must not live in route handlers, and note that the structure should make testing each layer in isolation straightforward.
Follow-up: "How do you test your service layer when it depends on a database call?"
Say this"My rule is that a route handler should read like pseudocode: parse input, call a service, return the result. If business logic appears in the route, it gets moved to a service before the PR merges."
53
What is middleware in Express and how do you compose it correctly?
Tests whether you understand middleware execution order and can distinguish global, router-scoped, and error-handling middleware rather than treating all middleware as one undifferentiated category.
Full answer + insider read in the complete set.Unlock all 100 · $19
54
How do you version a REST API without breaking existing clients?
Tests whether you can distinguish additive versus breaking changes and have a concrete policy for managing versions rather than just knowing that versioning exists.
Full answer + insider read in the complete set.Unlock all 100 · $19
55
How do you validate incoming request data, and why does runtime validation matter even when you're using TypeScript?
Tests whether you understand the gap between TypeScript's compile-time types and runtime safety and can explain why validation at the network boundary is non-negotiable regardless of your type system.
Full answer + insider read in the complete set.Unlock all 100 · $19
56
When do you use JWT over server-side sessions for authentication?
Tests whether you can articulate the revocability gap in JWTs honestly rather than treating them as a universal upgrade over sessions.
Full answer + insider read in the complete set.Unlock all 100 · $19
57
How do you implement refresh tokens and where should you store access tokens in a browser?
Tests whether you understand the XSS exposure of localStorage and can explain the in-memory access token plus HttpOnly cookie refresh token pattern without conflating the two token types.
Full answer + insider read in the complete set.Unlock all 100 · $19
58
How do you implement rate limiting in a Node.js API?
Tests whether you understand the fixed-window burst problem and can describe a production-grade distributed implementation rather than just naming a single-instance middleware package.
Full answer + insider read in the complete set.Unlock all 100 · $19
59
What is CORS and how does it actually work?
Tests whether you understand that CORS is browser-enforced rather than server-enforced, and can explain the preflight flow and the credentials-plus-wildcard incompatibility.
Full answer + insider read in the complete set.Unlock all 100 · $19
60
How do you build a centralized error-handling middleware in Express?
Tests whether you know the four-argument signature, understand the async handler gap in Express 4, and can describe a production-safe error response that includes correlation information without leaking internals.
Full answer + insider read in the complete set.Unlock all 100 · $19
61
How do you approach logging and observability in a Node.js service?
Tests whether you have a concrete structured logging stack and understand why correlation IDs and log levels are fundamental to debugging production issues rather than optional polish.
Full answer + insider read in the complete set.Unlock all 100 · $19
62
When do you use WebSockets versus Server-Sent Events?
Tests whether you apply SSE to the large category of server-push features rather than reaching for WebSockets by default and whether you understand the infrastructure difference between the two.
Full answer + insider read in the complete set.Unlock all 100 · $19
63
What are the honest tradeoffs of adopting GraphQL over REST?
Tests whether you can name real GraphQL pain points rather than selling it uncritically, especially N+1 queries, HTTP caching gaps, and authorization sprawl across resolvers.
Full answer + insider read in the complete set.Unlock all 100 · $19
64
How do you approach caching in a Node.js API?
Tests whether you think in layers (HTTP, application, database) rather than jumping straight to Redis and whether you can describe an invalidation strategy rather than just adding cache.get and cache.set calls.
Full answer + insider read in the complete set.Unlock all 100 · $19
65
How does helmet.js protect a Node.js API and what are its limits?
Tests whether you can name specific headers Helmet sets and explain their purpose rather than just saying it 'adds security headers,' and whether you know where Helmet's responsibility ends.
Full answer + insider read in the complete set.Unlock all 100 · $19
66
How do you defend a Node.js API against injection attacks, XSS, and CSRF?
Tests whether you can distinguish SQL injection, NoSQL injection, XSS, and CSRF as separate attack vectors with separate defenses rather than treating injection as a single category with one solution.
Full answer + insider read in the complete set.Unlock all 100 · $19
67
How do you manage secrets in a Node.js service across environments?
Tests whether you have a concrete secrets management practice beyond 'use environment variables' and understand the full lifecycle: local dev, staging, production, rotation, and audit logging.
Full answer + insider read in the complete set.Unlock all 100 · $19
68
When would you choose Fastify or NestJS over plain Express?
Tests whether you can make a concrete recommendation based on throughput requirements, team size, and complexity tolerance rather than defaulting to the most popular or most recent framework.
Full answer + insider read in the complete set.Unlock all 100 · $19
databases-performance1 free ↓
69
How do you find out why a Node API endpoint is slow?
Tests whether you have a systematic diagnostic approach rather than guessing, and whether you know the Node-specific tools that surface CPU, I/O, and event-loop bottlenecks.
free
My first move is to look at numbers before touching code. I check response time percentiles in my APM tool, not averages, because p95 and p99 are where the real pain lives. Then I attach Chrome DevTools profiler (or 0x) to the running process: it samples the event loop, garbage collection, and I/O in one shot and points me at the biggest contributor. If the flame graph shows a hot synchronous path, I check whether a library is blocking the main thread. If it shows I/O wait, I look at query plans and connection pool saturation. For CPU-bound slowness I run --inspect in staging and record a CPU profile in Chrome DevTools. Nine times out of ten the culprit is an unindexed query, a missing pool limit, or a synchronous JSON parse on a large payload.
Insider read
Really testing: Interviewers want to see a structured diagnostic loop, not a list of tools. The scoring question is: does the candidate measure first, then hypothesize, then verify?
The tell: Juniors say they would add console.time timers or guess at the slow line. Seniors describe pulling percentile metrics, attaching clinic.js, reading the flame graph to isolate the bottleneck, and fixing the root cause with a reproducible test.
Follow-up: "How would you tell whether the slowness is in your application code versus the database versus a downstream service?"
Say this"I never guess at a performance problem. I measure first with clinic.js or a CPU profile, identify the single biggest contributor, fix it, and measure again. Premature optimization is bad, but so is random optimization."
70
How do you manage database connection pooling in a Node.js app, and what goes wrong when you get it wrong?
Tests whether you understand that Node's async nature amplifies pool exhaustion problems compared to thread-per-request runtimes, and whether you know the parameters that matter.
Full answer + insider read in the complete set.Unlock all 100 · $19
71
When would you choose Prisma over TypeORM over knex, and why does it matter?
Tricky because all three can query Postgres, but their abstraction levels, type safety guarantees, and escape hatches differ in ways that bite teams at scale.
Full answer + insider read in the complete set.Unlock all 100 · $19
72
What is the N+1 query problem in a Node.js context and how do you fix it?
Tests whether you can recognize the pattern in JavaScript async code, not just describe it abstractly, and whether you know the fix at both the ORM and the query level.
Full answer + insider read in the complete set.Unlock all 100 · $19
73
How do you run a database transaction from Node.js application code, and what can go wrong?
Tests whether you understand the async/await connection trap in Node transactions and know how to avoid releasing a connection mid-transaction.
Full answer + insider read in the complete set.Unlock all 100 · $19
74
When would you choose MongoDB over PostgreSQL for a Node.js application, and what is the honest answer?
Tricky because the honest answer is nuanced: Mongo has genuine strengths, but most teams reach for it for the wrong reasons.
Full answer + insider read in the complete set.Unlock all 100 · $19
75
How do you add a Redis caching layer to a Node.js API, and how do you handle cache invalidation?
Tests whether you understand the write strategies, not just how to call get and set, and whether you know the invalidation patterns that avoid stale data in production.
Full answer + insider read in the complete set.Unlock all 100 · $19
76
How do you profile a Node.js application and read a flamegraph?
Tests whether you know the Node-specific toolchain beyond generic profiling advice, and whether you can interpret what a flamegraph actually shows.
Full answer + insider read in the complete set.Unlock all 100 · $19
77
How do you cache expensive computations inside a Node process without shooting yourself in the foot?
Tests whether you know in-process cache pitfalls: unbounded growth, stampedes, and multi-instance divergence.
Full answer + insider read in the complete set.Unlock all 100 · $19
78
How do you load test a Node.js API before shipping it?
Tests whether you treat load testing as a designed experiment with acceptance criteria rather than just throwing traffic at an endpoint and watching it burn.
Full answer + insider read in the complete set.Unlock all 100 · $19
79
How do you design a Node.js service for horizontal scaling, and what does stateless actually mean in practice?
Tests whether you understand what state needs to move out of the process and which patterns for storing it cause subtle bugs under load balancing.
Full answer + insider read in the complete set.Unlock all 100 · $19
80
How do you use BullMQ to handle slow or unreliable work in a Node.js API?
Tests whether you understand the producer-worker pattern for decoupling request handling from heavy processing, and whether you know the failure modes specific to job queues.
Full answer + insider read in the complete set.Unlock all 100 · $19
81
What are the tradeoffs between offset-based and cursor-based pagination in a Node.js API?
Tests whether you understand why OFFSET breaks under concurrent writes and can describe the cursor pattern in terms of the underlying database query.
Full answer + insider read in the complete set.Unlock all 100 · $19
82
How do you index a Postgres table accessed by a Node.js API, and when does an index make things worse?
Tricky because most engineers know indexes speed up reads, but fewer can explain the write overhead, the bloat risk, or when the query planner ignores an index you created.
Full answer + insider read in the complete set.Unlock all 100 · $19
83
How do you avoid slow queries from an ORM generating unexpected SQL in production?
Tests whether you treat ORM-generated SQL as code that requires review rather than a black box you trust by default.
Full answer + insider read in the complete set.Unlock all 100 · $19
84
How do you decide when to add a read replica versus a cache versus a CDN to solve a read performance problem?
Tests whether you can reason about where data originates, how stale it can be, and which layer solves the problem at the lowest operational cost.
Full answer + insider read in the complete set.Unlock all 100 · $19
testing-debugging1 free ↓
85
How do you debug a memory leak in a Node service?
Tests whether you have a systematic measurement approach to memory profiling rather than guessing, and whether you know the Node-specific tooling that surfaces which objects are surviving garbage collection.
free
My first move is to confirm I actually have a leak rather than a one-time allocation spike. I run the service under realistic load and watch heap usage over time with process.memoryUsage() or a Prometheus gauge. If RSS climbs without recovery across multiple GC cycles, I take a sequence of heap snapshots using Chrome DevTools connected over --inspect, then compare them to find which constructor is accumulating. Common culprits in Node are event listeners never removed from an EventEmitter, closures holding references in module-level arrays, and unbounded in-memory caches. Once I identify the growing object class, I trace back to where instances are created and add the missing cleanup or cap the collection size.
Insider read
Really testing: Interviewers are checking whether you treat memory leaks as a measurement problem. Vague answers about restarting the process or adding more RAM are an instant flag at senior level.
The tell: Juniors say they would restart the process or watch the memory gauge in the process manager. Seniors describe taking sequential heap snapshots, diffing retained object counts by constructor, and naming specific categories of leaks like listener accumulation on EventEmitter or a module-level cache with no eviction policy.
Follow-up: "What is the difference between RSS, heap total, and heap used in Node's <code>process.memoryUsage()</code> output?"
Say this"A leak is a retention problem, not a usage problem. I look for objects that should have been garbage-collected but were not, and heap snapshot diffs are the fastest way to name the constructor responsible."
86
What is the difference between unit and integration tests in a JavaScript codebase?
Tests whether you can articulate the isolation boundary and explain what each layer catches that the other misses, not just recall the dictionary definition.
Full answer + insider read in the complete set.Unlock all 100 · $19
87
When does mocking become a problem rather than a solution?
Tests whether you know the line between isolation and false confidence, which is where most test suites quietly rot over time.
Full answer + insider read in the complete set.Unlock all 100 · $19
88
How do you reliably test async code in Jest or Vitest?
Tests whether you know why a forgotten <code>await</code> produces a false pass rather than a meaningful failure, which is the trap that lets broken async code hide behind green tests.
Full answer + insider read in the complete set.Unlock all 100 · $19
89
How do you test an Express or Fastify API endpoint without spinning up a full server?
Tests whether you know how to run API tests in-process to avoid port conflicts, slow startup, and shared server state across parallel test files.
Full answer + insider read in the complete set.Unlock all 100 · $19
90
What is snapshot testing, and when is it actually useful?
Tests whether you can give an honest assessment of snapshot testing rather than either dismissing it or overselling it as a replacement for explicit assertions.
Full answer + insider read in the complete set.Unlock all 100 · $19
91
How does TypeScript help you catch bugs before tests even run?
Tests whether you see the type system as a layer of correctness with real tradeoffs, not just an IDE convenience or documentation tool.
Full answer + insider read in the complete set.Unlock all 100 · $19
92
What causes a test to be flaky in JavaScript, and how do you fix it?
Tests whether you diagnose flakiness systematically as a design problem rather than treating it as noise to suppress with retries.
Full answer + insider read in the complete set.Unlock all 100 · $19
93
How do you take and interpret a heap snapshot in Node?
Tests whether you know the comparison view and retained versus shallow size, which are the two concepts that make heap analysis actionable rather than overwhelming.
Full answer + insider read in the complete set.Unlock all 100 · $19
94
How do you debug a production error that you cannot reproduce locally?
Tests whether you treat production debugging as a measurement exercise with instrumentation and correlation, rather than a guessing game.
Full answer + insider read in the complete set.Unlock all 100 · $19
95
What are structured logs and why do they matter for debugging?
Tests whether you understand that structured logs are a machine-queryable interface, not just a formatting preference.
Full answer + insider read in the complete set.Unlock all 100 · $19
96
What makes a good CI pipeline for a Node service?
Tests whether you think about CI as a feedback loop to optimize rather than a box-checking ritual, and whether you know the stage ordering that prevents wasted time.
Full answer + insider read in the complete set.Unlock all 100 · $19
97
What is the test pyramid and how does it apply to a Node API service?
Tests whether you can map the abstract pyramid layers to concrete test types for a real API architecture rather than just reciting the shape.
Full answer + insider read in the complete set.Unlock all 100 · $19
98
When is end-to-end testing with Playwright actually worth the investment?
Tests whether you can give an honest cost-benefit answer rather than defaulting to always or never on end-to-end testing.
Full answer + insider read in the complete set.Unlock all 100 · $19
99
How do you test code that depends on the current time or random values?
Tests whether you know the dependency injection pattern for non-deterministic inputs, not just that fake timers exist as a patching tool.
Full answer + insider read in the complete set.Unlock all 100 · $19
100
What is your process when a test passes locally but fails in CI?
Tests whether you have a systematic debugging process for CI-specific failures rather than reflexively blaming the environment or adding a retry.
Full answer + insider read in the complete set.Unlock all 100 · $19
// complete set

All 100 questions. Every model answer. Every insider read.

Walk in knowing what a senior answer sounds like, and what they're actually scoring.

$19
// one-time · instant access · lifetime · no subscription
// interview bootcamp: $5,000+ · 1:1 coach: $200/hour · this playbook: $19
Unlock all 100 for $19
14-day money-back guarantee. No questions asked.
// what happens when you pay
1Secure checkout opens. Card, Apple Pay, Google Pay or PayPal, processed by Stripe.
2All 100 unlock instantly. Your private link opens the moment payment clears.
3It's yours for good. The receipt email contains your permanent link. Lose it? Email us, we resend.
VISAMastercardAmexApple PayGoogle PayPayPal
// payment handled by Lemon Squeezy, our merchant of record. We never see your card details. Support: support@howto-playbooks.com
Common questions
Why not just ask ChatGPT?+
ChatGPT gives you a plausible answer. It does not tell you whether that answer makes an interviewer want to hire you. The whole product is the insider read: what they're really testing, how a junior answer sounds versus a senior one, and the follow-up they'll throw next.
Are these realistic interview questions?+
They're modeled on the question patterns that come up in JavaScript and Node.js engineering interviews at large tech companies, covering JavaScript fundamentals, the event loop, the Node runtime, backend APIs, databases, and testing. Every answer includes what the interviewer is scoring.
What's different from free question lists?+
Free lists give you questions. This gives you the model answer plus what the interviewer is actually scoring, the junior vs. senior tell, and the follow-up coming next.
What if it doesn't help?+
14-day, no-questions-asked refund. Email support@howto-playbooks.com with your order number and we refund in full.
What format is it?+
A single web page, bookmarkable, works on any device. All 100 questions expandable with answers and insider reads. Lifetime access.
How do I get access after paying?+
Instantly. The moment payment clears, your private link opens with all 100 questions and answers. Your receipt email contains the same permanent link, so you can come back anytime, on any device. If you ever lose it, email support@howto-playbooks.com and we resend it.
Is the payment secure?+
Yes. Checkout is handled by Lemon Squeezy, our merchant of record, with payments processed by Stripe, the same infrastructure used by Amazon and Shopify. Card, Apple Pay, Google Pay and PayPal are supported. Your card details never touch our servers.
// more playbooks: 100 questions each
$19 one-time
// 100 questions · insider reads · 14-day refund
Unlock all 100