I have two JavaScript arrays:(我有两个JavaScript数组:)
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?(如何在JavaScript中合并两个数组,以使每个数组中的唯一项按插入原始数组中的相同顺序获得?)
ask by Vijjendra translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…