loading...

re: 🚀 Quick tips! 3 ways to get unique values from an array. 💜 VIEW POST

TOP OF THREAD FULL DISCUSSION
re: It seems that the [... new Set(arr)] is way faster than the other two. jsbench.me/xnkapa5nxq/1
 

Set also reliably keep what is .add() first as well. But I never really tested [...new Set(arr)] on whether the sequence is kept.

code of conduct - report abuse