Loading problem…
Let n = left.length and m = right.length.
function allPairs(left, right) { const pairs = [] for (const a of left) { for (const b of right) { pairs.push([a, b]) } } return pairs }