Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function passwordGenerator(input) {
- let n = Number(input[0]);
- let l = Number(input[1]);
- let print = '';
- for (let a = 1; a <= n; a++) {
- for (let b = 1; b <= n; b++) {
- for (let c = 97; c < 97 + l; c++) {
- for (let d = 97; d < 97 + l; d++) {
- for (let e = 1; e <= n; e++) {
- if (a < e && e > b) {
- print += `${a}${b}${String.fromCharCode(c)}${String.fromCharCode(d)}${e} `;
- }
- }
- }
- }
- }
- }
- console.log(print.trimEnd());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement