Using JavaScript Sets

A useful data structure that models the properties of mathematical sets

John Au-Yeung
Nov 5 · 9 min read
Photo by Sam McGhee on Unsplash

In JavaScript, Set objects are objects that hold collections of values. They can be iterated in the order they’re inserted. Each value in a Set may occur only once. This means that a Set in JavaScript is consistent with sets in math.

You've completed your member preview for this month, but when you sign up for a free Medium account, you get one more story.
Already have an account? Sign in

John Au-Yeung

Written by

Web developer. Subscribe to my email list now at http://jauyeung.net/subscribe/ . Follow me on Twitter at https://twitter.com/AuMayeung

Better Programming

Advice for programmers.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade