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"]