r/javascript • u/smellycode • Mar 02 '19
Useful javascript one-liners.
https://medium.com/@smellycode/js-one-liners-8bc0a6af2345?source=friends_link&sk=a9295a05aef9e514e137fca7eeb89cd1
344
Upvotes
r/javascript • u/smellycode • Mar 02 '19
6
u/Drugba Mar 03 '19
I absolutely love
[...new Set(arr)]for removing dupes from an array of primitives. That being said, if I was using it in a shared codebase, I'd be sure to add a comment explaining it as I don't think it's super clear at first glance.