I'm looking for a way to generate all possible combinations from several arrays. When it comes to 1, I was able to find solutions, however when it comes to more, then it gets problematic. To understand my issue easier, let's say we have this two arrays:['small','big']
and ['red', 'green']
, and the result I'm trying to get is:
small green ball, small red ball, big green ball, big red ball, green ball, red ball, small ball, large ball, green small ball, red large ball and etc.
The biggest difficulty for me is to figure out how you would make it so that, there wouldn't be any repeats from each array, example : small large ball or green red ball.