I have a simple problem that I can't solve:
const array = [0, 1, 2]
output:
[ [0], [0, 1], [0, 1, 2], [1], [1, 2], [0, 2], [2] ]
As you can see my output contain arrays with all possibilities of the first array. How can I do that?
I have a simple problem that I can't solve:
const array = [0, 1, 2]
output:
[ [0], [0, 1], [0, 1, 2], [1], [1, 2], [0, 2], [2] ]
As you can see my output contain arrays with all possibilities of the first array. How can I do that?