diff --git a/src/algorithms/sets/combinations/combineWithRepetitions.js b/src/algorithms/sets/combinations/combineWithRepetitions.js index 5e25635d..057b7e51 100644 --- a/src/algorithms/sets/combinations/combineWithRepetitions.js +++ b/src/algorithms/sets/combinations/combineWithRepetitions.js @@ -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) {