Given arr1: [0, 1, -1, 3, -1],
and arr2: [15, 15, 10, 20, 20],
how can I create this 2D array:
[[0, 15], [1, 15], [3, 20]]
You'll notice that I'm trying to exclude -1 values and their corresponding values in the same indices between both arrays.
I'm thinking create a copy of arr1 that excludes -1 values but I'm not sure how to go from there.