Created
February 6, 2020 21:48
-
-
Save Kiwka/309a3f52433ef8b43053b532d6159604 to your computer and use it in GitHub Desktop.
Calculating options by using cartesian product
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cartesian([arr1, arr2, arr3, arr4]).forEach( | |
(option1, option2, option3, option4) => { | |
// use option1, option2, option3, option4 here | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment