mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-11-10 11:09:43 +08:00
Compare commits
2 Commits
b210425382
...
613ffc25ca
Author | SHA1 | Date | |
---|---|---|---|
|
613ffc25ca | ||
|
c3f5eda5d9 |
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user