Walk into the interview having already heard the questions.

A MERN-only prep book: JavaScript from closures to generators, React to React 19, Node.js to streams and clusters, Express, NestJS and MongoDB — plus coding rounds and scenario questions with model answers.

JavaScript1 / 5

Interviewer asks

How can closures cause memory leaks?
chapters
122
DSA questions, tracked
226
career roadmaps
3
open source, no sign-up
Free

Organised around the interview loop

Seven stages, in the order most MERN loops run. Each one lists what the interviewer is checking and the chapters that cover it.

  1. Know the role

    What the job description really asks for at your level.

  2. JavaScript

    Can you explain the language, its internals and its async model?

  3. Frontend

    Hooks, rendering, React 19, state and a component built live.

  4. Backend

    APIs, auth, streams, scaling, security and data modelling.

  5. Coding

    Output puzzles, polyfills and features written under a timer.

  6. Scenarios

    Debugging, production incidents and design trade-offs, out loud.

  7. HR

    Your story, your project, and why this team.

Every chapter reads the same way

Five parts, always in this order, so revising a topic the night before takes minutes. Here is chapter 1, trimmed.

1Definition

Closures

A closure is a function that remembers the variables from the scope it was created in, even after that scope has finished executing.

2Explanation

Every function carries a hidden reference, [[Environment]], to the scope it was defined in. Call it from anywhere later and it can still reach those variables.

3Code

function createCounter() {
  let count = 0;
  return () => ++count;   // closes over count
}
const next = createCounter();
next(); // 1
next(); // 2

4Real-world use

Express middleware closes over its config: app.use(authMiddleware(config)).

5Likely questions

What’s the output of the classic setTimeout loop?

How can closures cause memory leaks?

Read the full chapter

Not sure what to learn next?

Frontend, backend and full-stack roadmaps — 75 topics. Each stage says what to learn and which project proves you learned it.

Change the example. Run it again.

The JavaScript playground runs in a sandboxed frame in your browser. No server, no account, and your code never leaves your machine.

Before you start

Something missing? Open an issue on GitHub

Is this MERN interview prep really free?

Yes. Every chapter — JavaScript, React, Redux, Node.js, Express, NestJS, MongoDB, TypeScript, coding questions and scenario questions — is open source and free, with no sign-up.

Who is this book for?

Developers interviewing for MERN, React or Node.js roles, from freshers to engineers with 5+ years. It starts with what employers actually list in MERN job descriptions, then goes from fundamentals to advanced internals, so you can stop at the level your target role asks for.

What is the difference between the coding and the scenario sections?

Coding questions are things you write: predict-the-output puzzles, polyfills, problem solving, React components and Express endpoints, each with a working solution. Scenario questions are things you talk through: a slow page, a memory leak, duplicate orders, a production outage — with the structured answer an interviewer wants to hear.

Do I need NestJS?

Not for most MERN roles — Express is the default. NestJS is covered because many enterprise teams and client projects use it, and knowing its dependency injection, guards and DTOs is a strong advantage in senior backend rounds.

Do I need an account, and how is my progress saved?

There is no account. Ticked topics and roadmap progress are stored in your own browser using localStorage, so nothing is uploaded. Clearing your browser data resets your progress.

Can I run the code examples?

Yes. The JavaScript playground runs your code in a sandboxed frame in your browser, and every JavaScript code block has a link to an online compiler.