Frontend Engineer track

Frontend interview questions and answers

Frontend interviews test JavaScript, how the browser works, CSS, accessibility and speed. Then you build or fix something in code. Practice the concepts and the coding in one mock interview.

Start a free mock interview

Questions

Interview questions and answers.

Real questions from this track, from easier to harder, with what a good answer covers. In the mock interview, each one comes with follow-ups based on what you say.

  1. JavaScript

    What is the difference between let, const and var?

    A good answer covers that var is scoped to the function while let and const are scoped to the block.

  2. DOM and events

    What is the DOM?

    A good answer covers that the DOM is a tree of objects the browser builds from the HTML.

  3. CSS and layout

    Explain the CSS box model.

    A good answer covers that every element is a box of content, padding, border and margin.

  4. Accessibility

    Why does semantic HTML matter?

    A good answer covers that elements like button, nav and h1 carry meaning that browsers and screen readers use.

  5. Async

    What is a promise in JavaScript?

    A good answer covers that a promise stands for a value that will arrive later, or an error.

  6. Browser

    What are the differences between cookies, localStorage and sessionStorage?

    A good answer covers that cookies are sent to the server with every request and localStorage is not.

  7. TypeScript

    What does TypeScript add over JavaScript?

    A good answer covers that TypeScript adds types that are checked before the code runs.

  8. JavaScript

    What is the difference between == and === in JavaScript?

    A good answer covers that === compares without converting types while == converts them first.

  9. DOM and events

    What is event bubbling?

    A good answer covers that an event fires on the target and then travels up through its parents.

  10. CSS and layout

    When do you use flexbox and when do you use grid?

    A good answer covers that flexbox lays items out along one direction.

  11. CSS and layout

    How do you make a page work on both phones and desktops?

    A good answer covers that layouts use flexible units and media queries to adapt to screen width.

  12. Performance

    What happens between the browser getting the HTML and showing the first pixels?

    A good answer covers that the browser parses HTML into the DOM and CSS into the CSSOM.

  13. Networking

    What is CORS, and why does it exist?

    A good answer covers that browsers stop a page from reading responses from another origin by default.

  14. Security

    What is XSS, and how do you prevent it?

    A good answer covers that XSS is text from an attacker that ends up running as script on your page.

  15. Async

    How does the event loop decide what runs next?

    A good answer covers that JavaScript runs one task at a time on a single main thread.

  16. JavaScript

    What is a closure, and where have you relied on one?

    A good answer covers that a function keeps access to the variables of the scope where it was created.

  17. JavaScript

    How is the value of this decided in JavaScript?

    A good answer covers that this is set by how a function is called, not where it is written.

  18. DOM and events

    What is event delegation, and when would you use it?

    A good answer covers that one listener on a parent handles events from many children as they bubble up.

  19. CSS and layout

    How does the browser decide which CSS rule wins?

    A good answer covers that more specific selectors win, with ids over classes over element names.

  20. Accessibility

    How do you make a custom widget usable with only a keyboard?

    A good answer covers that every action can be reached with Tab and works with Enter or Space.

  21. Async

    What does async and await change compared with then chains?

    A good answer covers that await pauses only the async function, not the whole page.

  22. Build and tooling

    How would you cut a large JavaScript bundle down?

    A good answer covers that you first measure what is in the bundle with an analyzer.

  23. Testing

    How do you split tests between unit, component and end-to-end tests for a frontend?

    A good answer covers that unit tests check small pieces of logic quickly.

  24. Architecture

    How do you decide where a piece of state should live?

    A good answer covers that state should live in the lowest place every part that uses it can reach.

  25. Performance

    What causes layout thrashing, and how do you avoid it?

    A good answer covers that reading layout values like offsetHeight after a style change forces layout right away.

  26. Performance

    What are the Core Web Vitals, and how would you improve a slow LCP?

    A good answer covers that LCP, INP and CLS measure loading, response to input and layout shift.

  27. Networking

    How does HTTP caching work for a frontend's files?

    A good answer covers that Cache-Control tells the browser how long it may reuse a response.

  28. Security

    What is CSRF, and how do modern apps prevent it?

    A good answer covers that CSRF tricks a logged-in browser into sending a request with its cookies.

  29. JavaScript

    How does prototype inheritance work, and how do classes relate to it?

    A good answer covers that objects look up missing properties along a chain of prototypes.

  30. TypeScript

    When do generics help in TypeScript?

    A good answer covers that a generic keeps the link between the input type and the output type.

  31. Performance

    How do you serve images well on a responsive site?

    A good answer covers that srcset and sizes let the browser pick the right file for the screen.

  32. Architecture

    Compare client-side rendering, server-side rendering and static generation.

    A good answer covers that client rendering ships a mostly empty page that JavaScript fills in.

  33. Performance

    What is hydration, and why can it hurt performance?

    A good answer covers that hydration runs the app again in the browser to attach handlers to server HTML.

  34. Performance

    How do you find and fix a memory leak in a single-page app?

    A good answer covers that leaks come from references that outlive the view, like listeners, timers and caches.

  35. Architecture

    How would you build a component library that many teams share?

    A good answer covers that components need a small, stable API and design tokens for shared values.

  36. Performance

    A page has a poor INP score. How do you make interactions faster?

    A good answer covers that INP measures the time from an input until the next frame is painted.

  37. Architecture

    When are micro-frontends worth it?

    A good answer covers that they let separate teams build and release parts of one app on their own.

  38. Architecture

    How would you make a web app work offline?

    A good answer covers that a service worker can answer requests from a cache it controls.

  39. Networking

    How would you keep a dashboard updated live from the server?

    A good answer covers that polling, server-sent events and WebSockets trade simplicity for push and two-way traffic.

  40. Performance

    How would you stop a large frontend from getting slower with every release?

    A good answer covers that performance budgets for bundle size and key metrics fail the build when they are broken.

What it covers

Topics.

  • Performance
  • JavaScript
  • Async
  • Architecture
  • CSS and layout
  • Networking
  • Security
  • DOM and events
  • Accessibility
  • TypeScript
  • Browser
  • Build and tooling

How it works

How the mock interview runs.

  1. Concept questions that start simple and get harder.

  2. Follow-ups on every answer, so you explain the why.

  3. One coding challenge in a live editor.

Your report scores technical correctness, problem-solving & tradeoffs, communication clarity, with quotes from your answers as proof.

Questions.

What do frontend interviews cover?

Expect questions on how JavaScript runs and how the browser draws a page. CSS layout, accessibility and speed come up a lot. You may get closures, the event loop and the DOM.

Do frontend interviews use a framework?

Some do, some don’t. This track is framework-free. React, Angular and Vue each have their own track.

How does an Orin mock interview work?

You talk with Orin by voice, like a video call. It asks questions, listens and asks follow-ups based on what you said. Coding happens in a live editor and design on a live whiteboard. After the interview you get a report with quotes from your answers, what cost you points and what to practice next.

Is it free?

Your first interview is free: a 15-minute round with a short coding exercise. No card needed.

Practice the real thing.

A frontend engineer mock interview by voice, with follow-ups and feedback you can use. First interview free.

Start free interview