DEV Community

Discussion on: Introduction to Sets in JavaScript – All You Need to Know

Collapse
 
vitale232 profile image
Andrew Vitale

Great write up! I'm very excited about the set in JS now.

The missing piece right now IMO is set operators. In Python, for example, you can do set1.difference(set2)

MDN has some simple functions that provide this functionality under the "Implementing basic set operations" header of their docs. So useful!
developer.mozilla.org/en-US/docs/W...

Collapse
 
alexdevero profile image
Alex Devero

Thanks Andrew. These operators could bring sets more to the forefront. Who knows, maybe they are somewhere on the JS road map.

Collapse
 
t3h2mas profile image
Thomas Noe

I end up looking up this page often when using sets in JS. Good share.