Is there a feature in JavaScript 6 that allows to map over multiple arrays ?
Something like a zipper :
var myFn = function (a, b) { console.log(a, b
As the other answer points out, this is commonly known as a zip. It can be implemented as:
let zipped = arr1.map((x, i) => [x, arr2[i]]);
Or as a function, basically:
let zip = (a1, a2) => a1.map((x, i) => [x, a2[i]]);
Which would let you do:
zip(["a","b","c"], [1,2,3]); // ["a", 1], ["b", 2], ["c", 3]