❔ How can I make something repeat an action for every possible combination in two arrays?

Say I have array 1 which is 0 to 19, and array 2 which is 0 to 24. I want to run a section of code like finding a random number between 1 and 20, and have that run for every combition of the two arrays, 0.0, 0.1, 3.4 etc.
3 Replies
Jimmacle
Jimmacle9mo ago
nested for loops? pseudocode:
foreach a in array1
foreach b in array2
doTheThing(a, b)
foreach a in array1
foreach b in array2
doTheThing(a, b)
Spookysquid19
Spookysquid199mo ago
Yeah, just realized
Accord
Accord9mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.