TalentdInterviewMy ordersBuy now · ₹299
2026 edition · React 19.3 · Version 1.0

Crack Frontend Interviews: JavaScript + React

648 interview questions with answers, for freshers and developers with up to 5 years of experience. Every output and every test was run before the book was built.

  • 648 questions: 194 output puzzles, 84 implement-from-scratch answers and 22 machine-coding builds with tests
  • 3 bonus PDFs: Top 50 JavaScript, Top 50 React and Top 100 frontend questions
  • Instant PDF download. Four study plans inside. New versions free from your order page
₹299 for 648 questions is less than ₹1 a question, with the bonuses and the study plans included.
  • Instant download
  • 30-day refund
  • Free updates

One-time payment. No subscription. No recurring charge.

974 A4 pagesRun on Node 24 and React 19.3Tagged from 168 interview reportsRazorpay secure checkout
Contents page and the Chapter 4 Predict the output opener from Crack Frontend Interviews 2026
Contents and the Predict the output chapter
Questions 10.6 and 10.7, React output questions with their answers, from Crack Frontend Interviews 2026
React output questions, checked with Vitest
The to-do app build in Chapter 14 with the list of what the interviewer checks, from Crack Frontend Interviews 2026
A machine-coding build and what the interviewer checks

Built for

Freshers

Campus drives and your first JavaScript and React round

Service-company developers

Moving to a startup or a product company

1 to 5 year React developers

Internals, performance and the React 19 follow-ups

Product-company rounds

Machine coding, output puzzles and frontend design

/ The real test

You write JavaScript every day. The round still catches you out.

Interviewers paste ten lines of async code and ask what prints. They ask for debounce from a blank file, or a to-do app in 45 minutes while they watch. Then they ask why it rendered three times.

Work rarely asks any of that, so people who ship React every week still freeze on it.

This book puts 648 of those questions in front of you, the outputs run and each follow-up written out.

/ See what's inside

Read 3 real questions from the book

An output puzzle, a React question and an implement question, copied from the book. Open the answer to see the output, the explanation and the follow-up.

Chapter 4 · Q 4.20

1-3 yrs·Event loop · async/await

Where does the code after await run?

What does this print, and in what order?

async function async1() {
  console.log("async1 start");
  await async2();
  console.log("async1 end");
}
async function async2() {
  console.log("async2");
}
console.log("script start");
setTimeout(() => console.log("setTimeout"), 0);
async1();
new Promise((resolve) => {
  console.log("promise1");
  resolve();
}).then(() => console.log("promise2"));
console.log("script end");

Reported at: Ykon, WriteSonic, Adobe

See the answer

Output (from the test run)

script start async1 start async2 promise1 script end async1 end promise2 setTimeout

script start, async1 start, async2, promise1, script end, async1 end, promise2, setTimeout. Everything up to the first await is synchronous, including the body of async2. The code after await and the .then are microtasks, queued in that order. The timer is last.

Likely follow-up

What if async2 ends with return Promise.resolve()? async1 end moves back two microtask turns. An async function that returns a promise has to follow it, which costs extra turns. With a longer chain (promise2, promise3, promise4), it would print after promise3.

Checked by harness/output/ch04-async/20-async-calls-async.mjs · Node 24.18.0

Chapter 10 · Q 10.6

1-3 yrs·Batching · state updater

Three setCount calls in one click

The click handler calls setCount three times. What is on the button after one click, and after two? How many times does Counter render in total?

import { useState } from "react";

let renders = 0;
function Counter() {
  const [count, setCount] = useState(0);
  renders++;
  function handleClick() {
    setCount(count + 1);
    setCount((c) => c + 1);
    setCount(count + 1);
  }
  return <button onClick={handleClick}>{count}</button>;
}

Reported at: WriteSonic, Microsoft

See the answer

1 after the first click, 2 after the second, and 3 renders in total. The three updates are queued and applied in order: count + 1 sets 1, the updater makes it 2, and the last count + 1 sets it back to 1.

Common mistake

Answering 3 because of the updater in the middle; a plain value queued after it replaces the result.

The test file checks

  • a plain value after an updater replaces it
  • updaters chain

Likely follow-up

How do you make one click add 3? Use the updater form for all three calls, setCount((c) => c + 1), so each one starts from the previous result. The test file checks it: one click shows 3.

Checked by harness/react/ch10-performance/mixed-updates.test.jsx · Node 24.18.0, React 19.3.1

Chapter 5 · Q 5.1

Fresher·Debounce · closures · timers

Debounce, with leading mode and cancel()

Implement debounce(fn, wait, { leading }) with a cancel() method.

Reported at: Flipkart, Razorpay, Swiggy, Trintech

See the answer

Keep one timer in a closure. Every call clears it and starts a new one, so fn runs only after wait ms with no calls, with the last call's arguments and this. With leading: true, run the first call of a burst at once and use the timer only to tell when the burst ends. cancel() clears the timer.

// Runs fn once calls stop for `wait` ms, with the last call's arguments and `this`.
// { leading: true } runs the first call of a burst at once and drops the rest of the burst.
// cancel() drops a pending call.
export function debounce(fn, wait, { leading = false } = {}) {
  let timer = null;

  function debounced(...args) {
    const runNow = leading && timer === null;
    clearTimeout(timer);
    timer = setTimeout(() => {
      timer = null;
      if (!leading) fn.apply(this, args);
    }, wait);
    if (runNow) fn.apply(this, args);
  }

  debounced.cancel = () => {
    clearTimeout(timer);
    timer = null;
  };

  return debounced;
}

The test file checks

  • runs once, after calls stop, with the last arguments
  • keeps this and passes every argument
  • a new burst after the wait runs again
  • leading: runs the first call at once and nothing at the end of the burst
  • leading: calls during the burst keep pushing the quiet period out
  • cancel() drops the pending call
  • cancel() resets leading mode so the next call runs at once

Likely follow-up

How do you use this debounce in a React search box? Create the debounced function once, not on every render, with useMemo(() => debounce(search, 300), []) or a useRef. Otherwise each render makes a new debounced function with its own timer and nothing is debounced. That keeps the search from the first render, so if search reads state or props, keep the latest one in a ref (searchRef.current = search on each render, and debounce (q) => searchRef.current(q)), or use useEffectEvent when the call happens inside an effect. Call debounced.cancel() in the effect cleanup so a late call does not run after the component unmounts. Many teams write a useDebounce(value, delay) hook instead, which sets a timeout inside useEffect and clears it in the cleanup.

Checked by harness/impl/ch05-functions/debounce.test.mjs · Node 24.18.0

That's 3 of 648. The rest, with the study plans and three bonus PDFs, are ₹299.

/ The diagnosis

Four reasons good developers still lose the round

Whether you've been rejected before or it's your first interview next week, one of these is usually the gap.

/ 01

Output puzzles need the exact order.

Ten lines of promises, timers and await, and one question: what prints? Knowing roughly how the event loop works gets you a wrong answer said with confidence.

/ 02

Writing it from a blank file is harder.

You have used debounce, Promise.all and bind for years. Writing one on a shared screen, with cancel(), errors and this handled, is a separate skill.

/ 03

The follow-up decides the round.

“Now make one click add 3.” “Why did it render three times?” Most people prepare the first answer and meet the second one live.

/ 04

Machine coding runs on a clock.

In the product-company reports behind this book, nearly two in three had a machine-coding round. A to-do app is easy with a free afternoon. In 45 minutes, with keys and state shape being marked, it's harder.

/ What's inside

648 questions in 16 chapters

JavaScript first, then React, then the rounds that aren't question and answer at all.

293

JavaScript

Chapters 1 to 5: the questions every frontend round opens with.

  • JavaScript fundamentals61
  • Closures, this, prototypes and classes47
  • Asynchronous JavaScript40
  • Predict the output (event loop, scope, this, types)110
  • Implement from scratch (polyfills, async utilities)35

189

React

Chapters 8 to 11, written for React 19, with useEffectEvent and Activity from 19.2.

  • React core54
  • Hooks and React 1952
  • Rendering, performance and React output questions48
  • State management, data fetching and routing35

/ Every question includes

More than the answer. The whole breakdown.

1The short answer

What you must get across in the first 20 seconds

2The real output

For output questions, the exact text the snippet printed when it was run

3The explanation

Why the answer is what it is, step by step

4The common mistake

Where there is one: the wrong answer most candidates give

5Say it like this

The answer as you would say it out loud, in three to five sentences

6The likely follow-up

The next question the interviewer asks, with its answer

/ See it before you buy

Real pages. Real code. Real output.

Pages from the book as you'll get them, in a PDF with clickable contents and question links.

  • Q 4.20 with the output from the test run
    Q 4.20 with the output from the test run
  • Debounce: code, spoken answer, follow-up
    Debounce: code, spoken answer, follow-up
  • The 14-day fresher plan, day by day
    The 14-day fresher plan, day by day
  • Appendix A: the 3-page cheat sheet
    Appendix A: the 3-page cheat sheet

/ How it works

From payment to practice in about a minute

  1. 1

    Pay in a minute

    Name, email and mobile, then UPI, card or net banking on Razorpay. No account needed.

  2. 2

    Download instantly

    Buttons for the book and the three bonus PDFs appear on screen. The same links arrive by email.

  3. 3

    Start Day 1 today

    Pick one of the four study plans in Chapter 0, fresher or product-company track, 14 or 30 days.

/ Why you can trust the answers

Every output was run before it was printed

A question bank is only as good as its answers. This is how this one was checked.

238

outputs printed by Node

238 snippets were run on Node 24.18 and the book shows what they printed. None of the output was typed from memory.

505

answers with a test or run file

Implement answers have node:test files. React answers and the 22 machine-coding builds have Vitest and React Testing Library tests on React 19.3.1. Each answer names its file.

168

interview reports

Company tags come from 168 reports of frontend interviews at companies hiring in India, July 2024 to October 2026. 105 say the interview was in India. No report, no tag.

/ How it compares

What the book adds to free prep

Keep the free stuff. Here's what the book adds.

Swipe to compare →

What you needBestThis book · ₹299YouTube playlistsFree question listsChatGPT
648 questions in one placePartialIf you ask
Output from actually running the codeSometimesCan be wrong
React 19 and 19.2 APIs coveredSomeRarelyCan be dated
Machine-coding builds with testsA fewIf you ask
Spoken answer and follow-up, every timeIf you ask
14-day and 30-day study plansIf you ask
Works offline, on your phone

/ Bonuses included

Three short PDFs for the last few days

Each entry links to the question in the book that answers it in full.

Top 50 JavaScript Questions
Bonus 1 · 12 pages

Top 50 JavaScript Questions

The 50 JavaScript questions listed most often across 16 prep sites on Google India's first page, each with a short answer you can say and the book question and page that answers it in full.

Top 50 React Questions
Bonus 2 · 12 pages

Top 50 React Questions

The same for React: hooks, rendering, state and what changed in React 18 and 19. Short enough to read the night before the round.

Top 100 Frontend Questions
Bonus 3 · 22 pages

Top 100 Frontend Questions

JavaScript, React, the browser and CSS in one list. A question had to appear on at least two of the 16 sites; ties are broken by the 168 interview reports.

Inside the book as well: Appendix A, a 3-page cheat sheet (event loop order, this rules, hooks rules, polyfill patterns, a machine-coding checklist), and Appendix B, a company index with the questions tagged to 102 companies.

/ The kit

Everything above. ₹299 once.

The math

₹299 for 648 questions comes to ₹0.46 a question, with three bonus PDFs and four study plans included. No subscription, nothing to renew.

The full kit

You get

  • Crack Frontend Interviews 2026 (648 questions, 974 pages)
  • Bonus 1: Top 50 JavaScript Questions (12-page PDF)
  • Bonus 2: Top 50 React Questions (12-page PDF)
  • Bonus 3: Top 100 Frontend Questions (22-page PDF)

Plus

  • Four study plans: 14 or 30 days, two tracks
  • 3-page cheat sheet and a company index
  • New versions (1.1, 1.2) free from your order page
  • 30-day refund
₹299
  • Razorpay secure
  • Instant PDF
  • 30-day refund
  • Free updates

One-time payment. Instant download. No recurring charges.

/ No risk

Changed your mind before downloading? Get every rupee back.

Email support@talentd.in within 30 days of buying with your order number, before you download any file (the book or a bonus), and we refund the full amount to your original payment method. No forms, no questions. Download access for that order ends with the refund.

/ Honest fit

Who this book is for. And who it isn't.

A good fit if

  • Your JavaScript or React round is coming up, as a fresher or with up to 5 years of experience
  • You build things in React at work but freeze on “what does this print?”
  • You have a machine-coding round and want timed builds to practise
  • You want one book instead of scattered videos and question lists

Not the right book if

  • You've never written JavaScript. Learn the basics first, then come back
  • You need DSA practice. The book covers frontend rounds, not data structures and algorithms
  • Your interviews are for Angular or Vue. This book is JavaScript and React
  • You want a promise of the exact questions in your interview. Nobody can honestly make one

/ FAQ

Questions buyers ask

How do I get the book after paying?

Download buttons for the book and the three bonus PDFs appear straight away, and we email you the same links. No account needed.

How does the 30-day refund work?

Email support@talentd.in within 30 days of buying with your order number, before you download any file (the book or a bonus). We refund the full amount to your original payment method; download access for that order ends with the refund.

Which React version does it use?

React 19. Every React answer was tested on React 19.3.1, and the book covers Actions, useActionState, useOptimistic and use, useEffectEvent and <Activity> from React 19.2, and the React Compiler. Older APIs such as class components appear where a codebase may still have them, and the book says so. Routing code uses React Router 8, with the v7 differences noted.

Was every answer really run?

Every output question, every implement answer, every React answer and every machine-coding build has a file that ran it: Node 24.18 for JavaScript, Vitest and React Testing Library on React 19.3.1 for React. The “Checked by” line under each answer names the file. Browser behaviour Node cannot show (layout, paint, real network) and the HTML and CSS snippets are explained, not run.

I have 3 or 4 years of experience. Is it worth it?

126 questions are marked 3+ years: internals, trade-offs and edge cases. Chapters 10, 14 and 15 cover performance, machine coding and frontend system design, and the product-company plans are written for 1 to 5 years of experience.

Does it cover TypeScript and testing?

Yes, as they come up in React interviews: 20 TypeScript for React questions and 15 on testing frontend code with Vitest and React Testing Library.

Can I read it on my phone?

Yes. It's an A4 PDF with clickable contents and question links. It opens on any phone, tablet or laptop; long code blocks are easier on a bigger screen.

What if a library changes after I buy?

The book gets a new version (1.1, 1.2 and so on) when a release changes an answer or a reader finds a mistake. The download link on your order page always gives you the latest version, at no extra cost.

I already bought it. Where are my files?

Open My orders (frontendprep.talentd.in/my-orders) and enter the email you paid with. We email you fresh download links straight away.

Is it a one-time payment?

Yes. Pay once by UPI, card or net banking. No subscription, no auto-renewal.

Can I share my copy?

No. Every page carries your name, email and order number, so a shared copy can be traced to its buyer. We cancel access for that order.

Who wrote the book?

Azhar Khan, founder of Talentd (talentd.in). The questions come from frontend interview reports at companies hiring in India, and every output and test was run on Node 24 and React 19.3 before it was printed.

Your next frontend round is coming. Walk in having seen the questions.

648 questions, three bonus PDFs and four study plans, as one instant download.

One-time payment · Instant PDF · 30-day refund

Crack Frontend Interviews 2026
Instant PDF·3 bonus PDFs·30-day refund
₹299