title: Remove Duplicates description: Removes duplicate values from an array. author: dostonnabotov tags: array,deduplicate
const removeDuplicates = (arr) => [...new Set(arr)];
// Usage:
const numbers = [1, 2, 2, 3, 4, 4, 5];
removeDuplicates(numbers); // Returns: [1, 2, 3, 4, 5]
Hey Here’s what I am working on ,