10
We have 4 teams:
Time 1 | Time 2 | Time 3 | Time 4
I would like to know how to automatically build a list of possible combinations of games between these teams.
Example:
Time 1 x Time 2 | Time 1 x Time 3 | Time 1 x Time 4 | ...
I’m having problems with the logic for the application.
This result also got as follows:
$n = 4;
console.log($n*($n-1)/2);
, what I need to create the listing, as follows: Time 1 x Time 2 Time 2 x Time 3 Time 1 x Time 3 Time 3 x Time 4 ;...– Hunteros
I thought you wanted the number of possible combinations. I edited the answer with the code to get the list of combinations.
– Wynn