Suppose you want to display every Codémon in your Codédex one by one.
Even though a Set has no index numbers (like codedex[0]), you can loop through its values directly using a for...of loop—just like you do with an array:
↗️
Loading editor...
↶
↷
A Set also has a built-in .forEach() method that runs a callback function for each value in the Set:
↗️
Loading editor...
↶
↷
Keep in mind that Sets do not have .map(), .filter(), or .reduce(). We'll see how to use those on a Set in just a moment!