Tivrin

Frontend and full-stack developer interviews (React)

12 questions · Who it's for: JavaScript, React, TypeScript and Node.js developers, freshers to three years

Rounds usually include an online coding test, a JavaScript and React round where you predict output or fix a bug, sometimes a machine-coding round where you build a small UI in an hour, and a manager or HR round. They check whether you understand how JavaScript and React really run, not just the syntax. The answers are patterns to adapt with your own facts, not scripts to learn by heart: interviewers can tell.

Practise this interview

Asha, our AI interviewer, asks questions like these, listens to your answers and shows you a better version of each.

  1. 1

    Walk me through a project you built.

    What they're checking: Did you build it yourself, and can you explain your choices?

    How to answer: What it does, your stack and your part, one hard problem and how you solved it, and what you'd change.

    A strong answer

    "I built [a job tracker] with React, TypeScript and a Node and Express API on Postgres; I did the frontend and the login. The hard part was the list page: it re-rendered on every keystroke in the search box, so I debounced the input and memoised the row component. If I rebuilt it, I'd use a data-fetching library like React Query instead of my own loading and caching code."

  2. 2

    What's the difference between var, let and const?

    What they're checking: Scope and hoisting, the base of many output questions.

    How to answer: Scope, hoisting and reassignment, with one example each.

    A strong answer

    "var is function-scoped and hoisted with the value undefined, so reading it before its line gives undefined. let and const are block-scoped and sit in the temporal dead zone until their line, so reading them early throws a ReferenceError. const stops reassignment, not change: a const array can still be pushed to. I use const by default and let only when I reassign."

  3. 3

    What does this print? for (var i = 0; i < 3; i++) { setTimeout(() => console.log(i), 0); }

    What they're checking: Closures and the event loop together.

    How to answer: Give the output, explain why, then give the fix.

    A strong answer

    "It prints 3, 3, 3. The callbacks run only after the loop has finished, and all three close over the same function-scoped i, which is 3 by then. With let, each iteration gets its own i, so it prints 0, 1, 2."

  4. 4

    Why does React need a key on list items, and why not use the index?

    What they're checking: How React matches elements between renders.

    How to answer, and a strong answer, with Pro

  5. 5

    What's the difference between any and unknown in TypeScript?

    What they're checking: Whether you use TypeScript for safety or only to silence errors.

    How to answer, and a strong answer, with Pro

  6. 6

    I call setCount(count + 1) three times in one click handler. Why does count go up by only one?

    What they're checking: How React state updates are batched.

    How to answer, and a strong answer, with Pro

  7. 7

    What is the cleanup function in useEffect for?

    What they're checking: Memory leaks, duplicate listeners and race conditions.

    How to answer, and a strong answer, with Pro

  8. 8

    This timer always logs 0. Why? useEffect(() => { const id = setInterval(() => console.log(count), 1000); return () => clearInterval(id); }, []);

    What they're checking: Stale closures, the most common hooks bug.

    How to answer, and a strong answer, with Pro

  9. 9

    Node.js runs JavaScript on one thread. How does it handle thousands of requests?

    What they're checking: Whether you know what blocks a Node server.

    How to answer, and a strong answer, with Pro

  10. 10

    Tell me about a time you disagreed with a senior or a code reviewer.

    What they're checking: Can you disagree with evidence and still work as a team?

    How to answer, and a strong answer, with Pro

  11. 11

    What is your notice period, and are you okay working from our office?

    What they're checking: Joining date and work-mode fit.

    How to answer, and a strong answer, with Pro

  12. 12

    Do you have any questions for us?

    What they're checking: Interest in how the team works.

    How to answer, and a strong answer, with Pro

Open all 12 answers with Pro

Every answer in every guide, unlimited practice interviews and every guidebook. ₹1,999 for 12 months.

See Pro

Now say them out loud: practise this interview with Asha.

More interview guides