Suppose I have two arrays (A and B) which are to be arguments to a function taking two values as arguments (a and b).
How can I use the function and the arrays in such a way that I obtain another array C that stores the result of putting the n-th element of A together with the n-th element of B into the function ...
var A = [1,2,3,4];
var B = [1,2,3,4];
function myFunction(a,b)
{
return a+b ;
}
C than should be something like:
[2,4,6,8]