Your product could be here, in front of thousands of JavaScript developers. Sponsor this spot →
JavaScript Quiz

JavaScript ES6+ Quiz

Modern JavaScript added a lot of useful syntax: destructuring, spread and rest, optional chaining (?.), nullish coalescing (??), Map and Set.

These questions check you know exactly how they behave, especially with null and undefined.

ES6+ questions

  1. Does the spread operator make a deep copy?
  2. When do default parameters apply in JavaScript?
  3. What is the difference between ?? and || in JavaScript?
  4. How does optional chaining short-circuit in JavaScript?
  5. When do destructuring default values apply?
  6. How do you swap two variables with destructuring?
  7. How do you remove duplicates from an array with Set?
  8. What does the rest operator do in object destructuring?
  9. Why can a Map have both 1 and "1" as keys?
  10. What does Array.from({ length: 3 }) create?

More topics