Zip is an aggregator that returns the Cartesian product of one or more collections.
Zip
var arrays = [ [1, 2, 3], ['a', 'b'] ]; var result = arrays .reduce((a, b) => a.length > b.length ? a : b) .map((e, i) => arrays .map((o) => o[i]));