DEV Community

[Comment from a deleted post]
Collapse
 
tcomtom profile image
Tom Shimada

This was a great article. This helped me with my project. I was using faker to create some data but faker created duplicate names in an array of objects, but the client didn't want any duplicates.

Worked perfectly Thanks!!

Still trying to understand the code though.

Especially
.filter(e=>e).map(e=>arr[e]);

Gotta dig deeper with map and filter!