JavaScript Interview Questions

JavaScript interview questions test closures, promises, the event loop, prototypes, and modern ES features including async/await and destructuring. Most frontend and full-stack JS interviews include at least one question on how JavaScript runs code asynchronously, and many candidates stumble there. This page covers 40 real JavaScript interview questions with answers across four formats: multiple choice, written answers, spoken responses, and live coding challenges, the same mix used in modern technical interviews.

Practice each question in your browser with no signup required. Answers stay hidden until you attempt the question: type, speak, or code your response first, then compare it against the model answer. Questions range from fundamentals for your first developer job to scenario-based questions for senior roles, so you can find the gaps in your knowledge before the real interview.

40 questions with answersLast updated: Oct 19, 2026
Start a mock interview

How to practice

  1. Choose a question. Pick any of the 40 questions. They mix multiple choice, written, spoken, and coding, the same mix a real interviewer uses.
  2. Attempt your answer. Select a multiple-choice option, type your written response, record a spoken answer, or write code in the editor.
  3. Reveal the model answer. Once you have attempted the question, the model answer unlocks so you can compare it with yours.
  4. Move to the next question. Track how many questions you have attempted with the progress bar at the top of the page.
  5. Take a mock interview. When you are ready, try a full mock technical interview on Plaicer with AI-driven follow-up questions.

JavaScript Interview Questions and Answers

0 of 40 attempted
1Multiple choice

How would you describe JavaScript and where does it run?

Attempt the question first to reveal the answer.

2Written answer

Describe JavaScript's characteristics, execution model, and dynamic typing

Attempt the question first to reveal the answer.

3Spoken answer

Walk through how you would fetch data from an API and handle errors using async/await

This browser cannot record audio. Answer the question out loud anyway, then compare yourself against the model answer below.

Attempt the question first to reveal the answer.

4Coding

Write an async function that fetches JSON data from an API and displays it on the page

// Fetch and Display Data
// Implement the solution here

Attempt the question first to reveal the answer.

5Multiple choice

Explain the Document Object Model and its role in web interaction

Attempt the question first to reveal the answer.

6Written answer

Explain how the DOM represents HTML as a tree and how JavaScript manipulates it

Attempt the question first to reveal the answer.

7Spoken answer

Describe a situation where you discovered a this binding issue and how you resolved it

This browser cannot record audio. Answer the question out loud anyway, then compare yourself against the model answer below.

Attempt the question first to reveal the answer.

8Coding

Implement event delegation to handle clicks on dynamically created list items

// Event Delegation Handler
// Implement the solution here

Attempt the question first to reveal the answer.

9Multiple choice

What is a closure and how does variable scope create them?

Attempt the question first to reveal the answer.

10Written answer

Explain how functions capture variables from outer scopes and retain them

Attempt the question first to reveal the answer.

11Spoken answer

Explain how you would implement a closure to create private variables in a module

This browser cannot record audio. Answer the question out loud anyway, then compare yourself against the model answer below.

Attempt the question first to reveal the answer.

12Coding

Create a counter function using closures to maintain private state

// Closure Counter
// Implement the solution here

Attempt the question first to reveal the answer.

13Multiple choice

Explain JavaScript hoisting and how it affects function and variable declarations

Attempt the question first to reveal the answer.

14Written answer

Describe how hoisting works differently for var, let, const, functions, and classes

Attempt the question first to reveal the answer.

15Spoken answer

Talk about a time you debugged callback hell and refactored to Promises or async/await

This browser cannot record audio. Answer the question out loud anyway, then compare yourself against the model answer below.

Attempt the question first to reveal the answer.

16Coding

Chain multiple Promises to handle sequential API calls

// Promise Chain
// Implement the solution here

Attempt the question first to reveal the answer.

17Multiple choice

How do let and const differ from var in scope and reassignment?

Attempt the question first to reveal the answer.

18Written answer

Contrast var's function scope with let/const's block scope and reassignment rules

Attempt the question first to reveal the answer.

19Spoken answer

Describe how you would set up event listeners on dynamically created DOM elements

This browser cannot record audio. Answer the question out loud anyway, then compare yourself against the model answer below.

Attempt the question first to reveal the answer.

20Coding

Select DOM elements and modify their content, attributes, and styles

// DOM Query and Manipulation
// Implement the solution here

Attempt the question first to reveal the answer.

21Multiple choice

What is callback hell and how do Promises and async/await solve it?

Attempt the question first to reveal the answer.

22Written answer

Explain how Promises and async/await provide better control flow than callbacks

Attempt the question first to reveal the answer.

23Spoken answer

Explain how you would use destructuring to improve code readability in a real project

This browser cannot record audio. Answer the question out loud anyway, then compare yourself against the model answer below.

Attempt the question first to reveal the answer.

24Coding

Use array methods like map, filter, reduce with callback functions

// Array Methods with Callbacks
// Implement the solution here

Attempt the question first to reveal the answer.

25Multiple choice

Explain how the event loop manages asynchronous operations in JavaScript

Attempt the question first to reveal the answer.

26Written answer

Describe the event loop, call stack, task queue, and microtask queue mechanics

Attempt the question first to reveal the answer.

27Spoken answer

Walk through how you would implement memoization using closures and objects

This browser cannot record audio. Answer the question out loud anyway, then compare yourself against the model answer below.

Attempt the question first to reveal the answer.

28Coding

Implement a debounce function to limit how often a function executes

// Debounce Function
// Implement the solution here

Attempt the question first to reveal the answer.

29Multiple choice

How does prototypal inheritance differ from classical inheritance?

Attempt the question first to reveal the answer.

30Written answer

Explain how objects inherit from prototypes and how to set up the chain

Attempt the question first to reveal the answer.

31Spoken answer

Talk about understanding and preventing memory leaks from retained closures

This browser cannot record audio. Answer the question out loud anyway, then compare yourself against the model answer below.

Attempt the question first to reveal the answer.

32Coding

Use destructuring to extract and work with object properties

// Object Destructuring
// Implement the solution here

Attempt the question first to reveal the answer.

33Multiple choice

What does this refer to and how does its binding work in different contexts?

Attempt the question first to reveal the answer.

34Written answer

Discuss how this binding works in different contexts and how to control it

Attempt the question first to reveal the answer.

35Spoken answer

Describe how you would implement the module pattern to organize related functions

This browser cannot record audio. Answer the question out loud anyway, then compare yourself against the model answer below.

Attempt the question first to reveal the answer.

36Coding

Implement the module pattern with private and public methods

// Module Pattern
// Implement the solution here

Attempt the question first to reveal the answer.

37Multiple choice

How does destructuring simplify extracting values from objects and arrays?

Attempt the question first to reveal the answer.

38Written answer

Explain array and object destructuring syntax and their practical uses

Attempt the question first to reveal the answer.

39Spoken answer

Explain how you would use prototypal inheritance to create reusable component classes

This browser cannot record audio. Answer the question out loud anyway, then compare yourself against the model answer below.

Attempt the question first to reveal the answer.

40Coding

Set up prototype-based inheritance between constructor functions

// Prototype Inheritance
// Implement the solution here

Attempt the question first to reveal the answer.

Topics covered

  • JavaScript fundamentals: execution model, dynamic typing, where JS runs
  • Scope and hoisting: var, let, const, block vs function scope
  • Closures: private state, memoization, avoiding memory leaks
  • The this keyword: call, apply, bind
  • Prototypes: prototype chain and prototypal inheritance
  • Asynchronous JavaScript: callbacks, promises, async/await, callback hell
  • The event loop: call stack, task queue, microtasks
  • Destructuring: arrays and objects
  • Array methods: map, filter, reduce
  • The DOM: manipulation, event listeners, event delegation, debouncing

Frequently asked questions

How many JavaScript interview questions are on this page?
40 real JavaScript interview questions across four formats: multiple choice (10), written answer (10), spoken answer (10), and coding (10).
Do I need to sign up to practice?
No. All 40 questions and model answers are free with no signup. You attempt each question first, and the model answer unlocks once you have engaged.
Who are these JavaScript interview questions for?
Developers preparing for JavaScript technical interviews at any level, from first job to senior engineer roles. Questions cover fundamentals through real-world scenarios.
What topics do the JavaScript questions cover?
The questions cover closures, scope, hoisting, and the this keyword. They also test prototypes, promises, async/await, and the event loop. Coding tasks include DOM manipulation, event delegation, and debouncing.
Can I practice coding questions in the browser?
Yes. Coding questions include starter code in an in-browser editor, so you can write your solution without installing anything.
How often are the questions updated?
The question bank is reviewed regularly and updated to reflect current JavaScript interview patterns.
Can I take a full mock interview?
Yes. Plaicer's mock technical interview walks you through a realistic 30 to 45 minute interview with AI-driven follow-up questions.
Do the questions cover TypeScript?
No. These questions focus on core JavaScript, since TypeScript interviews still test the same fundamentals: closures, async code, and the event loop.

Pick your language

View all programming interview questions

Need to run some JavaScript code first?

Online JavaScript Compiler

Reading answers is not the same as giving them. Sit a full mock interview and get scored on how you actually explain them.

Try a mock interview