mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-11-10 11:09:43 +08:00
Merge c3f5eda5d9
into 9046d80bdb
This commit is contained in:
commit
b210425382
@ -3,7 +3,7 @@
|
|||||||
* @param {number} comboLength
|
* @param {number} comboLength
|
||||||
* @return {*[]}
|
* @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
|
// If the length of the combination is 1 then each element of the original array
|
||||||
// is a combination itself.
|
// is a combination itself.
|
||||||
if (comboLength === 1) {
|
if (comboLength === 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user