Interview Q&A · JavaScript

JavaScript Interview Questions & Answers

All 204 JavaScript interview questions — fundamentals, functions and closures, prototypes and this, arrays, async, DOM, modules, modern ES6+, performance and coding tasks — with correct, up-to-date answers. This bank holds 204 questions across 18 topics and 11 topic groups. Every answer is written for current JavaScript versions, and each topic links to matching course lessons where they exist.

204 questions answered18 topics11 topic groups
Pick a topic

Every topic below links to its own page with all of its questions in one place.

Read the answer

Answers are checked against current language behaviour; old-guide claims are corrected.

Jump both ways

Each topic points to the matching course lesson, and lessons point back here.

JavaScript Fundamentals

18 questions across 2 topics — What the language is, the engine pipeline, types and scope rules.

Functions & Closures

22 questions across 2 topics — Declarations, arrows, higher-order patterns, scope chains and closures.

Objects, Prototypes & this

20 questions across 2 topics — Prototype chain, classes, descriptors and the this binding rules.

Arrays, Strings & Collections

20 questions across 2 topics — Iteration toolkit, string mechanics, destructuring and Map/Set.

Async JavaScript

16 questions across 1 topic — Event loop, promises, async/await, cancellation and concurrency control.

DOM & Browser

14 questions across 1 topic — DOM manipulation, events, forms, storage, rendering and accessibility.

Modules & Metaprogramming

22 questions across 2 topics — ES modules, error handling, iterators, proxies and reflection.

Modern JavaScript (ES6+)

14 questions across 1 topic — What each era changed — optional chaining, records, resources and beyond.

Performance & Memory

12 questions across 1 topic — Measurement, bundles, GC behavior and 60fps rendering.

Tricky Outputs & Coding Tasks

26 questions across 2 topics — Prediction gotchas plus implement-it-now favorites in idiomatic JS.

Scenarios & Rapid Fire

20 questions across 2 topics — Production judgment calls, plus one-line revision for the night before.

Recommended resourcesAffiliate links · may earn us a commission

Classic DSA interview booksThe reference books interviewers themselves learned from — great next to the visualizers.See the books Structured coding coursesVideo courses that pair well with visual practice — pick one language and go deep.Browse courses Cloud hosting for side projectsShip the portfolio project that gets you hired — free credits for new accounts.Claim credits