Tuesday 15 August 2023

Sort through an array of duplicates with Sets

The following JavaScript code is a quick and easy alternative to sorting through an array of duplicates. It was highlighted to me by my colleague Tom Smith. As before it is designed to go through an array of values that contains duplicates and create a new array of only the unique ones, but not arranged alphabetically in this instance.

Sort an array with JavaScript Sets
Sort an array with JavaScript Sets