Removing duplicates from an array using Set (and other Set methods)

Array.from

An even more condensed way of creating a unique array is to use Array.from. This consolidates the two steps into one.

Using Set

In addition to creating an object of unique values there are several functions that can be called on a Set.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store