Merging arrays and removing duplicates with Javascript
Published on Jun 13, 2022
When you have two different JavaScript arrays and merge them into one, it's important that you don't have the same element in there more than once. Here are two different ways to concatenate arrays while removing duplicates.
1. A loop and check if the element is already in the array
2. Using the ECMA 6 function called Set