DEV Community

Discussion on: JavaScript reduce() method – Simple Explanation with Simple Examples

Collapse
 
donut87 profile image
Christian Baer

Please do not use 'reduce' to get the names. There's another method for this and it is called map. First map, then reduce. Also... Please use a Set to collect the unique names.

Collapse
 
ubahthebuilder profile image
Kingsley Ubah

Hi Christian,

I mentioned that in the article.

Thanks.