Chat with us directly!
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
200+ questions
JavaScript
HTML
CSS
React
Angular
Svelte
JavaScript questions
TypeScript supported
200+ 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
54 questions
Total time
5 hours total
Questions List
Describe the difference between `<script>`, `<script async>` and `<script defer>`
Importance
High
Topics
HTML
JAVASCRIPT
Users completed
2767 completed
Explain how prototypal inheritance works
Importance
High
Topics
JAVASCRIPT
Users completed
2025 completed
Explain how `this` works in JavaScript
Importance
High
Topics
JAVASCRIPT
Users completed
1901 completed
What are the differences between variables created using `let`, `var` or `const`?
Importance
High
Topics
JAVASCRIPT
Users completed
2013 completed
What is the difference between `==` and `===`?
Importance
High
Topics
JAVASCRIPT
Users completed
1944 completed
What's the difference between a variable that is: `null`, `undefined` or undeclared?
Importance
High
Topics
JAVASCRIPT
Users completed
1722 completed
What's the difference between `.call` and `.apply`?
Importance
High
Topics
JAVASCRIPT
Users completed
1707 completed
Describe the difference between a cookie, `sessionStorage` and `localStorage`.
Importance
High
Topics
HTML
JAVASCRIPT
Users completed
1795 completed
Can you offer a use case for the new arrow => function syntax?
Importance
High
Topics
JAVASCRIPT
Users completed
705 completed
Describe event bubbling
Importance
High
Topics
JAVASCRIPT
HTML
Users completed
1468 completed
Explain event delegation
Importance
High
Topics
JAVASCRIPT
HTML
Users completed
1391 completed
Explain `Function.prototype.bind`
Importance
High
Topics
JAVASCRIPT
Users completed
1277 completed
Explain "hoisting"
Importance
High
Topics
JAVASCRIPT
Users completed
1381 completed
Explain the difference between synchronous and asynchronous functions
Importance
High
Topics
JAVASCRIPT
Users completed
1264 completed
What are the pros and cons of using Promises instead of callbacks?
Importance
High
Topics
JAVASCRIPT
Users completed
1165 completed
What is a closure, and how/why would you use one?
Importance
High
Topics
JAVASCRIPT
Users completed
1130 completed
What is event loop?
Importance
High
Topics
JAVASCRIPT
Users completed
1110 completed
What language constructions do you use for iterating over object properties and array items?
Importance
High
Topics
JAVASCRIPT
Users completed
480 completed
What's a typical use case for anonymous functions?
Importance
High
Topics
JAVASCRIPT
Users completed
1109 completed
Difference between: `function Person(){}`, `var person = Person()`, and `var person = new Person()`?
Importance
Mid
Topics
JAVASCRIPT
Users completed
714 completed
Explain Ajax in as much detail as possible.
Importance
Mid
Topics
JAVASCRIPT
NETWORK
Users completed
689 completed
Explain how JSONP works (and how it's not really Ajax)
Importance
Mid
Topics
JAVASCRIPT
NETWORK
SECURITY
Users completed
513 completed
Explain the difference between mutable and immutable objects
Importance
Mid
Topics
JAVASCRIPT
Users completed
567 completed
Explain the differences on the usage of `foo` between `function foo() {}` and `var foo = function() {}`
Importance
Mid
Topics
JAVASCRIPT
Users completed
646 completed
Explain what a single page app is and how to make one SEO-friendly
Importance
Mid
Topics
JAVASCRIPT
Users completed
577 completed
What advantage is there for using the arrow syntax for a method in a constructor?
Importance
Mid
Topics
JAVASCRIPT
Users completed
502 completed
What are the differences between ES2015 class and ES5 function constructors?
Importance
Mid
Topics
JAVASCRIPT
Users completed
481 completed
What is the definition of a higher-order function?
Importance
Mid
Topics
JAVASCRIPT
Users completed
543 completed
What is `"use strict";`?
Importance
Mid
Topics
JAVASCRIPT
Users completed
515 completed
What's the difference between an "attribute" and a "property"?
Importance
Mid
Topics
JAVASCRIPT
Users completed
497 completed
What's the difference between feature detection, feature inference, and using the UA string?
Importance
Mid
Topics
JAVASCRIPT
Users completed
398 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
470 completed
Can you describe the main difference between a `.forEach` loop and a `.map()` loop?
Importance
Low
Topics
JAVASCRIPT
Users completed
512 completed
Can you give an example for destructuring an object or an array?
Importance
Low
Topics
JAVASCRIPT
Users completed
467 completed
Can you give an example of a curry function and why this syntax offers an advantage?
Importance
Low
Topics
JAVASCRIPT
Users completed
320 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
370 completed
Difference between document `load` event and document `DOMContentLoaded` event?
Importance
Low
Topics
JAVASCRIPT
Users completed
360 completed
ES2015 Template Literals offer a lot of flexibility in generating strings, can you give an example?
Importance
Low
Topics
JAVASCRIPT
Users completed
367 completed
Explain the same-origin policy with regards to JavaScript
Importance
Low
Topics
JAVASCRIPT
NETWORK
Users completed
376 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
360 completed
How can you share code between files?
Importance
Low
Topics
JAVASCRIPT
Users completed
351 completed
How do you organize your code?
Importance
Low
Topics
JAVASCRIPT
Users completed
330 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
317 completed
What are the advantages and disadvantages of using Ajax?
Importance
Low
Topics
JAVASCRIPT
NETWORK
Users completed
327 completed
What are the benefits of using spread syntax and how is it different from rest syntax?
Importance
Low
Topics
JAVASCRIPT
Users completed
358 completed
What do you think of AMD vs CommonJS?
Importance
Low
Topics
JAVASCRIPT
Users completed
290 completed
What is the extent of your experience with Promises and/or their polyfills?
Importance
Low
Topics
JAVASCRIPT
Users completed
325 completed
What tools and techniques do you use for debugging JavaScript code?
Importance
Low
Topics
JAVASCRIPT
Users completed
382 completed
What's the difference between host objects and native objects?
Importance
Low
Topics
JAVASCRIPT
Users completed
347 completed
When would you use `document.write()`?
Importance
Low
Topics
JAVASCRIPT
Users completed
323 completed
Why is extending built-in JavaScript objects not a good idea?
Importance
Low
Topics
JAVASCRIPT
Users completed
368 completed
Why is it called a Ternary expression, what does the word "Ternary" indicate?
Importance
Low
Topics
JAVASCRIPT
Users completed
452 completed
Why would you use something like the `load` event?
Importance
Low
Topics
JAVASCRIPT
Users completed
371 completed
Why you might want to create static class members?
Importance
Low
Topics
JAVASCRIPT
Users completed
381 completed