Nettms · Building TomorrowAcademy of AI &
Engineering
Jobs
Free Learnings
For companiesTeach
Sign inStart free →
Interview Questions

Full Stack Developer Interview Questions & Answers

Frequently asked full stack developer interview questions across JavaScript, React, Node, APIs and databases — with concise answers. Practise them in a free AI mock interview.

Practise these in a free AI mock interview
  1. 1. What is the difference between state and props in React?

    Props are read-only data passed from a parent to a child. State is data a component owns and can change over time. Updating state re-renders the component; props change only when the parent passes new values.

  2. 2. Explain the JavaScript event loop.

    JavaScript is single-threaded; the event loop lets it handle async work. Synchronous code runs on the call stack; promise callbacks wait in the microtask queue and timer callbacks in the macrotask queue, running when the stack is empty. Microtasks run before the next macrotask.

  3. 3. What happens when you type a URL and press Enter?

    DNS resolves the domain to an IP, a TCP (and TLS) connection is made, the browser sends an HTTP request, the server responds with HTML, then the browser parses HTML/CSS/JS, builds the DOM and renders — fetching linked assets along the way.

  4. 4. How do you prevent SQL injection?

    Never concatenate user input into queries. Use parameterised queries / prepared statements (or an ORM), validate and sanitise input, and give the database account least privilege.

  5. 5. What makes an API RESTful?

    REST uses HTTP verbs (GET/POST/PUT/DELETE) on resources identified by URLs, returning representations (usually JSON). A RESTful API is stateless, resource-oriented, and uses correct status codes.

  6. 6. SQL vs NoSQL — when do you choose each?

    SQL databases are relational with fixed schemas and strong consistency — great for structured, related data and transactions. NoSQL offers flexible schemas and horizontal scale — great for large, evolving or unstructured data. Choose by data shape and scale needs.

  7. 7. What are React hooks? Give examples.

    Hooks let function components use state and lifecycle features: useState for local state, useEffect for side effects, useContext for shared data, useMemo/useCallback for performance. They must be called at the top level, not conditionally.

  8. 8. How would you debug and fix a slow web page?

    Measure first (Lighthouse/DevTools). Then compress/lazy-load assets, code-split JS, cache (CDN + HTTP caching), reduce re-renders, add DB indexes for slow queries, and avoid blocking the main thread.

  9. 9. What is CORS?

    Cross-Origin Resource Sharing — a browser rule that blocks a page from calling a different origin unless that server returns the right Access-Control-Allow-Origin headers. You fix it on the server, not the browser.

  10. 10. Authentication vs authorization?

    Authentication verifies who you are (login). Authorization decides what you are allowed to do (roles/permissions). You authenticate first, then authorize each action.

  11. 11. What is the difference between var, let and const?

    var is function-scoped and can be redeclared; let and const are block-scoped. const cannot be reassigned, though an object it points to can still mutate. Prefer const, then let, and avoid var.

  12. 12. What are closures in JavaScript?

    A closure is a function that remembers variables from the scope where it was created, even after that scope has finished running. It is how JavaScript supports data privacy and function factories.

  13. 13. What is the difference between == and ===?

    == compares after converting types, so "5" == 5 is true. === compares value and type with no conversion, so "5" === 5 is false. Prefer === to avoid surprises.

  14. 14. What are promises and async/await?

    A promise represents a value that will arrive later (pending, then fulfilled or rejected). async/await is syntax that lets you write promise-based code that reads top to bottom, using try/catch for errors.

  15. 15. What is the virtual DOM?

    A lightweight in-memory copy of the UI. React compares the new virtual DOM to the previous one and updates only the parts of the real DOM that changed, which is faster than re-rendering everything.

  16. 16. Why do React lists need a key prop?

    Keys give each item a stable identity so React can tell which items changed, were added or removed, and update efficiently. Using the array index as a key can cause bugs when the list reorders.

  17. 17. What is middleware in Express?

    Functions that run in order on each request, with access to req, res and next(). They handle cross-cutting concerns — logging, authentication, body parsing, error handling — before the route handler runs.

  18. 18. What is a JWT and how does token auth work?

    A JSON Web Token is a signed token holding user claims. On login the server issues it, the client sends it on each request, and the server verifies the signature to authenticate the user without storing session state.

  19. 19. What is a database index and when do you add one?

    An index speeds up reads on a column, like a book index. Add them on columns used in WHERE, JOIN or ORDER BY, but not everywhere, since indexes slow down writes and use extra storage.

  20. 20. Cookies vs localStorage vs sessionStorage?

    Cookies are sent to the server on every request and suit auth. localStorage persists in the browser until cleared; sessionStorage lasts only for the tab. Only cookies are automatically sent to the server.

  21. 21. What is the difference between PUT and PATCH?

    PUT replaces the whole resource with the payload; PATCH updates only the fields you send. PUT is designed to be idempotent; PATCH usually is too, depending on the operation.

  22. 22. How do you handle errors in a Node/Express API?

    Validate input, wrap async handlers so rejected promises are caught, use a central error-handling middleware, return correct status codes with clear messages, and log errors on the server without leaking internals to the client.

  23. 23. What does the useEffect dependency array do?

    It tells React when to re-run the effect. An empty array runs it once on mount; listing values runs it whenever they change; omitting the array runs it after every render. Missing dependencies cause stale-data bugs.

  24. 24. What is the difference between debounce and throttle?

    Debounce waits until the user stops triggering an event before running (good for search-as-you-type). Throttle runs at most once per interval (good for scroll or resize). Both limit how often expensive work runs.

  25. 25. Which HTTP status codes should an API return?

    200 for success, 201 for created, 400 for a bad or validation request, 401 for not authenticated, 403 for not authorised, 404 for not found, and 500 for a server error. Correct codes make an API predictable.

Knowing the answers isn’t enough — say them out loud

Practise these Full Stack questions in a free AI mock interview: answer by voice, get instant feedback on your strengths and the gaps to fix.

Start a free mock interviewBuild a free resume

Admissions open · free to apply

Request your admission

Attended a masterclass or have a friend's referral code? You get ₹15,000 off. Fill this and our team takes it from here — pay by cash or online.

Nettms · Building TomorrowAcademy of AI &
Engineering

Free masterclasses, live cohorts, and pan-India placement support. Building Tomorrow.

ISO CertifiedStartup IndiaPractitioner-taught

Programs

  • Applied AI Engineer
  • Data Analysis with Gen AI
  • BIM
  • All programs

Free Tools

  • Code Compiler
  • Python Playground
  • Pandas Playground
  • SQL Playground
  • AI Glossary
  • Success Stories

Free Learning

  • Free Masterclass
  • Free Learnings
  • Free Admission
  • Blog
  • Events
  • WhatsApp Channel
  • Newsletter

Workshops

  • AI Workshop
  • BIM Workshop
  • Refer & Earn

Company

  • About
  • Hire with us
  • Careers at Nettms
  • Become a trainer
  • Contact
  • Privacy
  • Terms
  • Refund policy

Get the weekly drop.

One email a week — career insights, free masterclass invites, and what India's top employers are hiring for.

© 2026 Nettms Urban Habitat Pvt. Ltd. · 🌱 Building Tomorrow

Hyderabad, India

  • Home
  • Programs
  • Practice
  • Free
  • Account