IT Training
Blog
Search

30 Full Stack Developer Interview Questions (HTML, JavaScript, React, Node)

Laptop with code editor open on a desk next to a plant

Full stack interviews check three layers: front end (HTML, CSS, JavaScript and a framework such as React), back end (Node.js or another server language, APIs and authentication), and data (SQL or MongoDB). These 30 questions cover what junior and fresher full stack developers are asked most, with short answers and examples.

Need a learning order first? Read our full stack developer roadmap.

HTML and CSS

1. What is semantic HTML and why does it matter?

Using tags that describe meaning, such as header, nav, main, article and button, instead of generic div elements. It helps screen readers, search engines and other developers understand the page.

2. Explain the CSS box model.

Every element is a box made of content, padding, border and margin. With box-sizing: border-box, the width you set includes padding and border, which makes layouts easier to reason about.

3. Flexbox vs Grid?

Flexbox lays items out in one direction, a row or a column, and is ideal for navigation bars and aligning items. Grid handles rows and columns together and is ideal for full page layouts and card grids.

4. How do you make a site responsive?

Use a mobile-first approach with fluid widths, flexible images, Flexbox or Grid, and media queries for larger screens. Always include the viewport meta tag.

JavaScript

5. var vs let vs const?

Keyword Scope Reassign
var Function Yes, and it is hoisted as undefined
let Block Yes
const Block No (but object contents can change)

6. What is a closure?

A function that remembers variables from the scope where it was created, even after that scope has finished.

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

7. == vs ===?

== converts types before comparing, so '5' == 5 is true. === compares value and type without conversion. Use === by default.

8. Explain the event loop.

JavaScript runs on one thread. Slow tasks such as timers and network calls are handed to the browser or Node.js. When they finish, their callbacks wait in a queue, and the event loop runs them once the call stack is empty. Promise callbacks (microtasks) run before timer callbacks.

9. Promises vs async/await?

Both handle asynchronous code. async/await is cleaner syntax on top of promises that reads like normal sequential code.

async function loadUser(id) {
  try {
    const res = await fetch(`/api/users/${id}`);
    if (!res.ok) throw new Error('Request failed');
    return await res.json();
  } catch (err) {
    console.error(err);
  }
}

10. What is event delegation?

Adding one listener to a parent element instead of many on each child, and using event.target to find which child was clicked. It is faster and works for elements added later.

11. map vs forEach vs filter vs reduce?

map returns a new array of transformed items, filter returns items that pass a test, reduce combines items into one value, and forEach only runs code for each item and returns nothing.

React

12. What is the virtual DOM?

A lightweight copy of the UI in memory. When state changes, React builds a new virtual tree, compares it with the old one, and updates only the parts of the real DOM that changed.

13. Props vs state?

Props are inputs passed from a parent and are read-only inside the component. State is data the component owns and can change, which triggers a re-render.

14. Explain useEffect.

useEffect(() => {
  const id = setInterval(tick, 1000);
  return () => clearInterval(id); // cleanup
}, []); // empty array: run once after first render

It runs side effects such as data fetching or subscriptions after render. The dependency array controls when it runs again.

15. Why do lists need a key?

Keys let React match list items between renders so it updates, adds or removes the right ones. Use a stable id, not the array index, when items can be reordered.

16. How do you manage state in a large app?

Keep state as local as possible, lift it up when siblings need it, use Context for app-wide values such as the theme or logged-in user, and use a library such as Redux Toolkit or Zustand, or a data-fetching tool such as React Query, when state gets complex.

Node.js, Express and APIs

17. What is Node.js?

A JavaScript runtime built on Chrome’s V8 engine that runs JavaScript on the server. Its non-blocking I/O makes it good for APIs and real-time apps.

18. What is middleware in Express?

A function that runs between the request and the response, for logging, parsing JSON, authentication or error handling. It calls next() to pass control on.

app.use(express.json());
app.use((req, res, next) => {
  console.log(req.method, req.url);
  next();
});

19. What makes an API RESTful?

Resources have clear URLs (/users/42), HTTP methods match actions (GET read, POST create, PUT or PATCH update, DELETE remove), requests are stateless, and responses use proper status codes.

20. Name common HTTP status codes.

200 OK, 201 Created, 204 No Content, 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 409 Conflict, 500 Internal Server Error.

21. Session cookies vs JWT?

With sessions, the server stores login state and the browser holds a cookie with a session id. With JWT, a signed token holds the user claims and the server verifies the signature without storing state. Store tokens in httpOnly cookies rather than localStorage to reduce XSS risk.

22. What is CORS?

A browser security rule that blocks a page from calling an API on another origin unless the API sends headers such as Access-Control-Allow-Origin allowing it.

23. How do you store passwords?

Never in plain text. Hash them with a slow algorithm such as bcrypt or Argon2, which adds a salt automatically.

Databases

24. SQL vs NoSQL?

SQL databases (PostgreSQL, MySQL) use tables, fixed schemas and joins, and suit related data such as orders and customers. NoSQL databases such as MongoDB store flexible documents and suit fast-changing or nested data.

25. What is an index?

A data structure that speeds up lookups on a column, like a book index. It makes reads faster but writes slightly slower, so index the columns you filter and join on.

26. Write a join.

SELECT u.name, COUNT(o.id) AS orders
FROM users u
LEFT JOIN orders o ON o.user_id = u.id
GROUP BY u.name;

27. What is the N+1 query problem?

Loading a list with one query and then running one extra query per item. Fix it with a join, eager loading in your ORM, or batching.

Deployment and system questions

28. How would you deploy a MERN app?

Build the React app and serve it from a CDN or static host, run the Node API on a platform such as Render, Railway or a cloud VM in a Docker container, use a managed database such as MongoDB Atlas, store secrets in environment variables, and set up CI to deploy on every merge.

29. How do you improve page load speed?

Compress and resize images, lazy-load below-the-fold content, split JavaScript bundles, cache static files with a CDN, and reduce API calls. Measure with Lighthouse before and after.

30. Explain a project you built.

Describe the problem, the stack and why you chose it, one hard bug you solved, and what you would improve. Keep a live link and the GitHub repository ready.

Frequently asked questions

Which stack should I prepare for, MERN or Java?

Check the job descriptions in your city. Startups often ask for MERN; banks and service companies often ask for Java with Spring Boot. The fundamentals above apply to both.

Do full stack interviews include DSA?

Product companies usually include one or two data structures and algorithms rounds. Service companies focus more on practical web questions and projects.

How many projects do I need?

Two or three complete, deployed projects with authentication, a database and clean code are enough for most fresher roles.

More guides are in our full stack development tutorials. For the backend language, try these Python interview questions.

Other articles

Radium4 — IT training blog

Practical, plain-English guides for DevOps, cloud, data, Python, testing and security learners.