How to generate fully combinations of multiple arrays?
const source = [ ["a", "b", "c"], ["d", "e", "f"], ["g", "h", "i"] ]; const result = combination(source); Need result, like a cartesian product, but with combinations of all sizes:
["a"] ["a", "d"] ["a", "d", "g"] ... ["b"] ... ["b", "f", "i"] ... ["i"]