0

I have the following unknown number of arrays

var sizes = ["8", "9", "10"];
var colors = ["Black", "Blue"];
var laces = ["Yes", "No"];
....
....
upto n array

I have a case where i have to find all the possible combinations of all strings in these arrays

for example :

var combinations = [["8", "Black", "Yes", ...], ["9", "Black", "Yes", ...], ...];

This is the best answer Answer

E_net4 - Krabbe mit Hüten
  • 24,143
  • 12
  • 85
  • 121
Harkal
  • 1,705
  • 9
  • 28
  • 1
    There is also this [all-possible-combinations-of-a-2d-array-in-javascript](https://stackoverflow.com/questions/53311809/all-possible-combinations-of-a-2d-array-in-javascript) – pavlovic265 Jul 02 '21 at 03:34
  • 1
    I think this will be your answer please check https://stackoverflow.com/a/57015870/15320376 – Kevin Mac Jul 02 '21 at 03:35
  • i m verifying all the comments please wait – Harkal Jul 02 '21 at 03:36
  • @pavlovic265 thats the best answer i think. thank you guys. the way i was searching couldnt load those answers else i would just have looked into them. thank you again – Harkal Jul 02 '21 at 03:40

0 Answers0