this post was submitted on 03 Jan 2025
3 points (100.0% liked)

Quicksnip

1 readers
1 users here now

https://quicksnip.dev/ , but with fedify.dev to create an experimental federated snippet store right from lemmy (hope that this doesn't count as spam!)

founded 1 month ago
MODERATORS
 

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]
you are viewing a single comment's thread
view the rest of the comments
[–] Linuxer@discuss.online 1 points 1 month ago

Hey Here's what I am working on ,