Remove duplicate items from an array. Creates a new array with duplicate items removed. Adapted from: (c) 2019 Chris Ferdinandi, MIT License https://gomakethings.com
The input array.
A new array with duplicates removed.
// Remove duplicates from an arrayconst uniqueArray = dedupe([1, 2, 2, 3, 4, 4, 5]);console.log(uniqueArray); // Output: [1, 2, 3, 4, 5] Copy
// Remove duplicates from an arrayconst uniqueArray = dedupe([1, 2, 2, 3, 4, 4, 5]);console.log(uniqueArray); // Output: [1, 2, 3, 4, 5]
Remove duplicate items from an array. Creates a new array with duplicate items removed. Adapted from: (c) 2019 Chris Ferdinandi, MIT License https://gomakethings.com