var Arr1 = [1,3,4,5,6]; var Arr2 = [4,5,6,8,9,10];
I try to combine these two arrays and the output goes [1,3,4,5,6,4,5,6]
I used $.merge(Arr1, Arr2); this part to combine them. Using alert, I see a merged array as shown above.
Now my question is: how can I get the following output: [1,3,4,5,6,8,9,10]
i.e. Items must be unique and also sorted in the same way as I mentioned.
Please, help.
javascript jquery arrays merge
Monibrata
source share