In Javascript, what is the best way for iterating concurrently on two arrays and calling a function on the two running elements? For example:
var a = [1, 2, 3];
var b = [11, 12, 13];
function my_func() { /* some custom function */}
The code should execute my_func 3 times, like this:
my_func(1,11);
my_func(2,12);
my_func(3,13);
How can I achieve that without defining a new function, but using jQuery/underscore api?
For example, this way (using underscore.js)?
Or:
–