DEV Community

Discussion on: 20 Killer JavaScript One Liners ☝️

Collapse
 
martin2844 profile image
martin2844

Good post. Just wanted to comment that making a set removes duplicates but also converts the array into a set. It stops being an array.

Collapse
 
nacho profile image
Nacho Iacovino ⚡

It's not a set because he's spreading it inside an array, so it becomes an array again.