I have a custom function in my google apps script that takes two variables. I want this function to take two arrays for parameters, but the standard approach of putting "if input.map, return input.map(function)" doesn't work with two variables.
I have tried recursing through the inputs, but since there are two in the function, it does not work with both.
this is not the function i am using, but it has the same problem.
function multiply(x,y)
{
if (x.map){
return x.map(multiply)
}
if (y.map){
return y.map(multiply)
}
return x * y
}
I expect the formula to take two arrays (i.e. A1:A5, B1:B5) and perform the function on each variable -- i.e. returning A1 * B1, A2 * B2 etc.