Compare commits

...

2 Commits

Author SHA1 Message Date
farid
613ffc25ca
Merge c3f5eda5d9 into 2c67b48c21 2024-03-09 16:08:15 -07:00
farid
c3f5eda5d9
fix : default length
comboLength must be have a  default value . function got stock.
2023-10-13 16:11:40 +03:30

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) {