DEV Community

Discussion on: 1 line of code: How to merge two Arrays and clean all duplicate entries

Collapse
 
igorfilippov3 profile image
Ihor Filippov

This will only work with primitives. With more complicated cases, like array of objects, it will not work

Collapse
 
martinkr profile image
Martin Krause

Hi Igor,

thank you for your contribution, yes exactly, it's leveraging the set object. It's not doing a deep comparison.
I will update the description to be more precise.

Cheers!