Enjoy 20% off all plans by
following us on social media
. Check out other
promotions
!
Dismiss
Interviews
Dashboard
Practice questions
Guides
Pricing
Sign in / up
Get full access
Practice by framework
210+ questions
JavaScript
HTML
CSS
React
Angular
Svelte
JavaScript questions
TypeScript supported
210+ JavaScript and TypeScript interview questions, from implementing common library APIs, utility functions, algorithms, to building UI components and more.
Try these popular JavaScript questions
Describe the difference between a cookie, `sessionStorage` and `localStorage`.
Topics
HTML
JAVASCRIPT
Explain how `this` works in JavaScript
Topics
JAVASCRIPT
Coding
Quiz
Topic
JavaScript
CSS
HTML
Accessibility
Internationalization
Performance
Network
Security
Testing
Search quiz questions
Sort by
Number of questions
69 questions
Total time
6 hours total
Questions List
Describe the difference between `<script>`, `<script async>` and `<script defer>`
Importance
High
Topics
HTML
JAVASCRIPT
Users completed
3043 completed
Explain how prototypal inheritance works
Importance
High
Topics
JAVASCRIPT
Users completed
2221 completed
Explain how `this` works in JavaScript
Importance
High
Topics
JAVASCRIPT
Users completed
2093 completed
What are the differences between variables created using `let`, `var` or `const`?
Importance
High
Topics
JAVASCRIPT
Users completed
2220 completed
What is the difference between `==` and `===` in JavaScript?
Importance
High
Topics
JAVASCRIPT
Users completed
2132 completed
What's the difference between a variable that is: `null`, `undefined` or undeclared?
Importance
High
Topics
JAVASCRIPT
Users completed
1889 completed
What's the difference between `.call` and `.apply`?
Importance
High
Topics
JAVASCRIPT
Users completed
1855 completed
Describe the difference between a cookie, `sessionStorage` and `localStorage`.
Importance
High
Topics
HTML
JAVASCRIPT
Users completed
1938 completed
Can you offer a use case for the new arrow => function syntax?
Importance
High
Topics
JAVASCRIPT
Users completed
848 completed
Describe event bubbling
Importance
High
Topics
JAVASCRIPT
HTML
Users completed
1592 completed
Describe event capturing
Importance
High
Topics
JAVASCRIPT
HTML
Users completed
78 completed
Explain event delegation
Importance
High
Topics
JAVASCRIPT
HTML
Users completed
1509 completed
Explain `Function.prototype.bind`
Importance
High
Topics
JAVASCRIPT
Users completed
1383 completed
Explain "hoisting"
Importance
High
Topics
JAVASCRIPT
Users completed
1502 completed
Explain the difference between synchronous and asynchronous functions
Importance
High
Topics
JAVASCRIPT
Users completed
1375 completed
Difference between: `function Person(){}`, `const person = Person()`, and `const person = new Person()`?
Importance
Mid
Topics
JAVASCRIPT
Users completed
781 completed
Explain AJAX in as much detail as possible
Importance
Mid
Topics
JAVASCRIPT
NETWORK
Users completed
753 completed
Explain how JSONP works (and how it's not really Ajax)
Importance
Mid
Topics
JAVASCRIPT
NETWORK
SECURITY
Users completed
561 completed
Explain the difference between mutable and immutable objects
Importance
Mid
Topics
JAVASCRIPT
Users completed
623 completed
Explain the differences between CommonJS modules and ES modules
Importance
Mid
Topics
JAVASCRIPT
Users completed
27 completed
Explain the differences on the usage of `foo` between `function foo() {}` and `var foo = function() {}`
Importance
Mid
Topics
JAVASCRIPT
Users completed
697 completed
Explain what a single page app is and how to make one SEO-friendly
Importance
Mid
Topics
JAVASCRIPT
Users completed
625 completed
How do you abort a web request using `AbortController`?
Importance
Mid
Topics
JAVASCRIPT
NETWORK
Users completed
29 completed
How does JavaScript garbage collection work?
Importance
Mid
Topics
JAVASCRIPT
Users completed
26 completed
What advantage is there for using the arrow syntax for a method in a constructor?
Importance
Mid
Topics
JAVASCRIPT
Users completed
551 completed
What are iterators and generators and what are they used for?
Importance
Mid
Topics
JAVASCRIPT
Users completed
20 completed
What are JavaScript polyfills for?
Importance
Mid
Topics
JAVASCRIPT
Users completed
23 completed
Can you describe the main difference between a `.forEach` loop and a `.map()` loop?
Importance
Low
Topics
JAVASCRIPT
Users completed
562 completed
Can you give an example for destructuring an object or an array?
Importance
Low
Topics
JAVASCRIPT
Users completed
517 completed
Can you give an example of a curry function and why this syntax offers an advantage?
Importance
Low
Topics
JAVASCRIPT
Users completed
357 completed
Create a for loop that iterates up to `100` while outputting **"fizz"** at multiples of `3`, **"buzz"** at multiples of `5` and **"fizzbuzz"** at multiples of `3` and `5`
Importance
Low
Topics
JAVASCRIPT
Users completed
412 completed
Difference between document `load` event and document `DOMContentLoaded` event?
Importance
Low
Topics
JAVASCRIPT
Users completed
404 completed
ES2015 Template Literals offer a lot of flexibility in generating strings, can you give an example?
Importance
Low
Topics
JAVASCRIPT
Users completed
412 completed
Explain the same-origin policy with regards to JavaScript
Importance
Low
Topics
JAVASCRIPT
NETWORK
Users completed
422 completed
Explain why the following doesn't work as an IIFE: `function foo(){ }();`. What needs to be changed to properly make it an IIFE?
Importance
Low
Topics
JAVASCRIPT
Users completed
398 completed
How can you share code between files?
Importance
Low
Topics
JAVASCRIPT
Users completed
385 completed
How do you organize your code?
Importance
Low
Topics
JAVASCRIPT
Users completed
364 completed
What are JavaScript object getters and setters for?
Importance
Topics
JAVASCRIPT
Users completed
16 completed
What are JavaScript object property flags and descriptors?
Importance
Topics
JAVASCRIPT
Users completed
16 completed
What are `Symbol`s used for?
Importance
High
Topics
JAVASCRIPT
Users completed
51 completed
What are the differences between `Map`/`Set` vs `WeakMap`/`WeakSet`?
Importance
High
Topics
JAVASCRIPT
Users completed
42 completed
What are the pros and cons of using Promises instead of callbacks?
Importance
High
Topics
JAVASCRIPT
Users completed
1254 completed
What are the various ways to create objects in JavaScript?
Importance
High
Topics
JAVASCRIPT
Users completed
47 completed
What are workers in JavaScript used for?
Importance
High
Topics
JAVASCRIPT
Users completed
35 completed
What is a closure, and how/why would you use one?
Importance
High
Topics
JAVASCRIPT
Users completed
1226 completed
What is event loop?
Importance
High
Topics
JAVASCRIPT
Users completed
1206 completed
What language constructions do you use for iterating over object properties and array items?
Importance
High
Topics
JAVASCRIPT
Users completed
575 completed
What's a typical use case for anonymous functions?
Importance
High
Topics
JAVASCRIPT
Users completed
1201 completed
What are server-sent events?
Importance
Mid
Topics
JAVASCRIPT
Users completed
17 completed
What are the differences between ES2015 classes and ES5 function constructors?
Importance
Mid
Topics
JAVASCRIPT
Users completed
527 completed
What are the differences between `XMLHttpRequest` and `fetch()`?
Importance
Mid
Topics
JAVASCRIPT
NETWORK
Users completed
16 completed
What is the definition of a higher-order function?
Importance
Mid
Topics
JAVASCRIPT
Users completed
592 completed
What is `"use strict";`?
Importance
Mid
Topics
JAVASCRIPT
Users completed
563 completed
What's the difference between an "attribute" and a "property"?
Importance
Mid
Topics
JAVASCRIPT
Users completed
538 completed
What's the difference between feature detection, feature inference, and using the UA string?
Importance
Mid
Topics
JAVASCRIPT
Users completed
430 completed
Why is it, in general, a good idea to leave the global scope of a website as-is and never touch it?
Importance
Mid
Topics
JAVASCRIPT
Users completed
509 completed
What are some of the advantages/disadvantages of writing JavaScript code in a language that compiles to JavaScript?
Importance
Low
Topics
JAVASCRIPT
Users completed
347 completed
What are the advantages and disadvantages of using AJAX?
Importance
Low
Topics
JAVASCRIPT
NETWORK
Users completed
361 completed
What are the benefits of using spread syntax and how is it different from rest syntax?
Importance
Low
Topics
JAVASCRIPT
Users completed
392 completed
What are the various data types in JavaScript?
Importance
Low
Topics
JAVASCRIPT
Users completed
19 completed
What do you think of AMD vs CommonJS?
Importance
Low
Topics
JAVASCRIPT
Users completed
316 completed
What is the extent of your experience with Promises and/or their polyfills?
Importance
Low
Topics
JAVASCRIPT
Users completed
355 completed
What tools and techniques do you use for debugging JavaScript code?
Importance
Low
Topics
JAVASCRIPT
Users completed
422 completed
What's the difference between host objects and native objects?
Importance
Low
Topics
JAVASCRIPT
Users completed
376 completed
When would you use `document.write()`?
Importance
Low
Topics
JAVASCRIPT
Users completed
353 completed
Why is extending built-in JavaScript objects not a good idea?
Importance
Low
Topics
JAVASCRIPT
Users completed
401 completed
Why is it called a Ternary expression, what does the word "Ternary" indicate?
Importance
Low
Topics
JAVASCRIPT
Users completed
492 completed
Why would you use something like the `load` event?
Importance
Low
Topics
JAVASCRIPT
Users completed
407 completed
Why might you want to create static class members?
Importance
Low
Topics
JAVASCRIPT
Users completed
411 completed