LD
Size: a a a
LD
LD
LD
DD
}
С
DD
RO
RO
AB
O
АК
VP
ГЩ
ГЩ
А
RO
const input = "ab";
const results = [];
function combination(i, elt, size) {
if(elt.length === size) return results.push(`${elt}@paula.example`);
for (let j = 0; j < input.length; j++) combination(j, elt+input[j], size);
}
combination(0, "", 1);
combination(1, "", 2);
combination(2, "", 3);
combination(3, "", 4);
console.log(results);
ED
EY
ED
LD