Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Javascript removing duplicates in array

const array = [1, 1, 2, 3, 5, 5, 1]
const uniqueArray = [...new Set(array)];

console.log(uniqueArray); // Output: [1, 2, 3, 5]
Source by thecodingcompany.hashnode.dev #
 
PREVIOUS NEXT
Tagged: #Javascript #removing #duplicates #array
ADD COMMENT
Topic
Name
1+9 =