Full stack developer interview questions for freshers

Fresher web developer interviews test fundamentals across the stack and then dig into a project you built. These questions cover what interviewers ask most, with short answers you should be able to explain in your own words.

HTML, CSS and JavaScript

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

Using elements by meaning, such as header, nav, main, button and label, rather than generic divs. It improves accessibility, SEO and maintainability.

2. Explain the CSS box model.

Every element is content, then padding, then border, then margin. box-sizing: border-box makes width include padding and border, which simplifies layouts.

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

let and const are block-scoped; const cannot be reassigned. var is function-scoped and hoisted, which causes subtle bugs, so modern code avoids it.

4. What does async/await do?

It lets you write asynchronous code, such as waiting for a fetch request, in a readable sequential style while the program keeps running.

React

5. What are props and state?

Props are inputs passed into a component by its parent; state is data a component owns and can change, which triggers a re-render.

6. Why do lists need keys?

Keys let React match list items between renders so it updates the right elements efficiently. Use stable IDs, not array indexes when items can move.

7. What is useEffect for?

Running side effects after rendering, such as fetching data or subscribing to events, with a dependency array that controls when it runs again.

Back end and APIs

8. What is a REST API?

An interface where resources are accessed with HTTP methods: GET to read, POST to create, PUT or PATCH to update and DELETE to remove, usually exchanging JSON.

9. What do status codes 200, 201, 400, 401, 403, 404 and 500 mean?

OK, created, bad request, not authenticated, authenticated but not allowed, not found and server error.

10. What is middleware in Express?

A function that runs during request handling, for example to parse JSON, check authentication or log requests, before passing control on.

Databases

11. SQL or NoSQL: how do you choose?

SQL databases suit structured, related data with strong consistency; document databases suit flexible structures. Many applications work well with either if the data model is thought through.

12. What is an index?

A data structure that speeds up lookups on a column at the cost of extra storage and slower writes.

13. What is a SQL injection and how do you prevent it?

An attack where user input changes a query. Prevent it with parameterised queries, never by joining raw input into SQL strings.

Authentication and security

14. How should passwords be stored?

Never in plain text. Store a slow, salted hash such as bcrypt and compare hashes at login.

15. What is a JWT?

A signed token that carries claims about a user. The server verifies the signature on each request; it should have a short expiry and contain no secrets.

16. What is CORS?

A browser rule that controls which other origins may call your API. The server declares the allowed origins.

Project questions

17. Walk me through how data flows in your app.

Describe a user action, the request to the API, validation and database work on the server, the response and how the UI updates.

18. What would you improve in your project?

Name a concrete improvement, such as tests, input validation, error handling or performance, and explain why. It shows judgement.

Build projects you can explain in the free Full Stack internship, or read the full stack career guide.

Common questions

What do fresher web developer interviews focus on?

Fundamentals of HTML, CSS and JavaScript, one framework, how APIs and databases work, basic security and a detailed walkthrough of a project you built.

Do I need to know data structures for web developer roles?

Many companies include a basic coding round, so practise arrays, strings, maps and simple algorithms alongside web skills.

Practise with a free Full Stack internship