JavaScript Quiz Question #2: A Set of Objects
Nick Scialli (he/him)
Posted on April 22, 2020
Consider the following Set
of objects spread into a new array. What gets logged?
const mySet = new Set([{ a: 1 }, { a: 1 }]);
const result = [...mySet];
console.log(result);
A) [{a: 1}, {a: 1}]
B) [{a: 1}]
Put your answer in the comments!
💖 💪 🙅 🚩
Nick Scialli (he/him)
Posted on April 22, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.