Search

New JavaScript Set methods

By Chris Coyier on

Sets in JavaScript are quite useful as they are like an array, but can only contain one of a specific item. So you can unique-ify an array easily, and even willy-nilly add stuff to it and not worry about duplicates: Now they are even more useful with recently universally available methods, as Brian Smith summarizes:

Frontend Masters ❤️ Open Source

Did you know? Frontend Masters Donates to open source projects. $313,806 contributed to date.