I have the Arrays a and b
a = [1,2,3]
b = [15,25,35]
and I have the variale v
v = 36
where v is the sum of some of the combinations between a and b , that is (according to the example): v = a[0] + b[2]
I know I have to add each element of the array to with each element of the array b and so on until I find v , but I do not know how to do it in javascript
I also want to know how to invert the order to add it in all the possible ways, since they make me a test changing the arrays and the code should keep working