Answers for "javascript remove duplicated from Array"

0

javascript remove duplicated from Array

const removeDuplicates = (arr) => [...new Set(arr)];

console.log(removeDuplicates([1, 2, 3, 3, 4, 4, 5, 5, 6]));
// Result: [ 1, 2, 3, 4, 5, 6 ]
Posted by: Guest on September-28-2021

Code answers related to "javascript remove duplicated from Array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language