How to call items from an array inside a function
问题 I have a function "zoom" which takes the following format: zoom( [a,b,c,d....], [a,b,c,d...] ); I also have a for loop which gets me the values that need to go into the zoom array: ABC.getAggregation("V")[0].getItems().forEach( function (item) { var a = item.getPosition().split(";")[0]; var b = item.getPosition().split(";")[1]; ABC.zoom( [...], [...] ); }); How can I add variables a and b into the arrays of function zoom? All variable a's must go into the first array and all variables b must