I have 2 arrays where I would like to compare the index number not the element against another array's elements that would correspond to that index number and return the element.
array 1
index 0 = [cat]
index 1 = [dog]
index 2 = [bird]
index 3 = [mouse]
array 2
[2]
[1]
[0]
[3]
expected result:
[bird]
[dog]
[cat]
[mouse]
Expected results: array 1:index 0 = cat ,index 1 = dog,index 2 = bird,index 3 = mouse
array 2: 2, 1, 0, 3
expected result: bird,dog,cat,mouse