[Solved] How could I use JS to transform given array to other arrays? [closed]
So after the update I actually understand the problem. As for the solution. I think a recursive approach would be best here. I’ll just give the pseudocode and leave implementation up to you: function getAllCombinations( inputArr ) { if inputArr has just one element { return a list with all possible values } first = … Read more