This commit is contained in:
farid 2024-07-13 21:03:33 +02:00 committed by GitHub
commit b210425382
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,7 +3,7 @@
* @param {number} comboLength
* @return {*[]}
*/
export default function combineWithRepetitions(comboOptions, comboLength) {
export default function combineWithRepetitions(comboOptions, comboLength = comboOptions.length) {
// If the length of the combination is 1 then each element of the original array
// is a combination itself.
if (comboLength === 1) {