Frontend Interview: 15 In-Depth Questions
Every question dissected into three layers: Plain Answer → Follow-up Logic → Quantified High-Score Sample.
Questions reflect common real-world prompts. The three answer layers are illustrative examples, not real interview transcripts.
① Common plain answer
"JS is single-threaded. Synchronous code runs first, async tasks are queued, and they execute once synchronous tasks finish."
Why it falls short: Textbook definition without microtask vs macrotask execution order or real engineering edge cases. The interviewer cannot judge whether you have handled real concurrency issues.
② Interviewer follow-up logic
③ Quantified high-score answer
Mechanistically, JavaScript's Event Loop orchestrates single-threaded concurrency across three strict phases: executing the current synchronous stack, fully draining the microtask queue (Promise callbacks and queueMicrotask), and dequeuing exactly one macrotask from the task queue (setTimeout, setInterval, or I/O) before evaluating browser rendering pipelines. Consequently, Promise.then microtasks always execute before any 0ms setTimeout macrotask. In our enterprise dashboard, a bulk status update across 250 data records was triggering synchronous layout thrashing, locking the main thread for 3.4 seconds and causing noticeable frame drops. By refactoring the pipeline to partition records into 25-item chunks scheduled via queueMicrotask and synchronizing state flushes with requestAnimationFrame, we reduced main-thread blocking down to 320 milliseconds—a 90.6% reduction in Total Blocking Time (TBT). Because uncontrolled microtasks starve the rendering engine, we enforced a strict recursion limit of 4 iterations before deliberately yielding execution back to the macrotask queue.
Keep practicing in another role
After Frontend Engineering, these are the adjacent roles to practice next
Backend Interview: 15 In-Depth Questions
Core Tech · Distributed Systems · BQ
View bank
Skill extensionFull-Stack Engineering Interview: 15 In-Depth Questions
End-to-End Delivery · Architecture · Full-Stack Perf · BQ
View bank
Same tech stackMobile App Engineer Interview: 15 In-Depth Questions
App Architecture · Rendering Perf · Cross-Platform · BQ
View bank
Don't see your role? Browse all 25 roles →
Difficult Situations & Follow-Up Questions
How do you interview with no degree or a bootcamp background?
Explain having no degree or a bootcamp background in one clear sentence, then handle the fundamentals probes interviewers use to verify skill.
How do you explain having no internships as a new grad?
Explain having no tech internships in one direct sentence, then master the technical probes interviewers use to verify production readiness.
How do you explain a 6-month career gap in an interview?
Explain a 6-month career gap in one sentence without apologizing, then see the follow-up questions interviewers ask next.
Related reading
When is the best time to apply for jobs in the US?
Discover the best time to apply for jobs in the US across Q1 and autumn surges, complete with a structured 12-week runway from resume to offer letters.
How to rewrite "responsible for" on a resume?
Replace "responsible for" by naming friction, direct action, and scope. Here is how to turn passive job duties into defended resume bullets.
How to answer "by how much" interview question?
When asked "by how much" without exact numbers, state the baseline range, the measurement method, and the mechanism. Here is how to answer convincingly.
Finished the breakdown? Try a realistic mock interview
Start a round without signing up. Experience in-depth follow-up questions and surface your real project highlights.
No credit card required · Free 600 credits on signup