I need to merge two arrays so that they also preserve each other’s order, but the first one’s order should be mandatory.
const arr = [5, 1, 2, 4]
const arr2 = [1, 3, 4, 5]
result to be [5, 1, 2, 3, 4]
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
I need to merge two arrays so that they also preserve each other’s order, but the first one’s order should be mandatory.
const arr = [5, 1, 2, 4]
const arr2 = [1, 3, 4, 5]
result to be [5, 1, 2, 3, 4]