What would be the most efficient way to compare two arrays of integers and return a unique array of the higher corresponding integers in each array?
(can use lodash)
ex:
var arr1 = [0, 1, 2, 1, 0];
var arr2 = [1, 0, 0, 3, 0];
// result = [1, 1, 2, 3, 0];