I have two JavaScript arrays:
var array1 = ["Vijendra","Singh"];
var array2 = ["Singh", "Shakya"];
I want the output to be:
var array3 = ["Vijendra","Singh","Shakya"];
The output array should have repeated words removed. How do I merge two arrays in JavaScript so that I get only the unique items from each array in the same order they were inserted into the original arrays?