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!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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!