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.
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.
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.
What is the DOM?
A good answer covers that the DOM is a tree of objects the browser builds from the HTML.
Explain the CSS box model.
A good answer covers that every element is a box of content, padding, border and margin.
Why does semantic HTML matter?
A good answer covers that elements like button, nav and h1 carry meaning that browsers and screen readers use.
What is a promise in JavaScript?
A good answer covers that a promise stands for a value that will arrive later, or an error.
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.
What does TypeScript add over JavaScript?
A good answer covers that TypeScript adds types that are checked before the code runs.
What is the difference between == and === in JavaScript?
A good answer covers that === compares without converting types while == converts them first.
What is event bubbling?
A good answer covers that an event fires on the target and then travels up through its parents.
When do you use flexbox and when do you use grid?
A good answer covers that flexbox lays items out along one direction.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
When do generics help in TypeScript?
A good answer covers that a generic keeps the link between the input type and the output type.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
How it works
How the mock interview runs.
Concept questions that start simple and get harder.
Follow-ups on every answer, so you explain the why.
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