Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript merge two lists without duplicates

const array1 = ['a','b','c'];
const array2 = ['c','c','d','e'];
const array3 = [...new Set([...array1,...array2])];
console.log(array3); // ["a", "b", "c", "d", "e"]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #merge #lists #duplicates
ADD COMMENT
Topic
Name
4+5 =