DEV Community

loading...

Discussion on: Javascript Array Manipulation With Sets

Collapse
calvinpak profile image
CP Author

Note on unions:
[...new Set(a1, a2))] works for same type, failed with [1], ['x'], updated to use concat instead.

Use Set only to dedupe, use Array for manipulation.