I have two arrays that are the same length, for example var a = [5,2,6,2,7,5];
and var b = [2,3,7,4,3];
.
I also have another array which is var c = [0,0,0,0,0];
How do I compare a
and b
to put the highest element into c
which in this case should become [5,3,7,7,5];