Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function safePasswordGenerator(input) {
- let a = Number(input[0]);
- let b = Number(input[1]);
- let passCount = Number(input[2]);
- let charA = 35;
- let charB = 64;
- let print = '';
- for (let j = 1; j <= a; j++) {
- for (let x = 1; x <= b; x++) {
- if (charA === 56) {
- charA = 35;
- }
- if (charB === 97) {
- charB = 64;
- }
- print += `${String.fromCharCode(charA)}${String.fromCharCode(charB)}${j}${x}${String.fromCharCode(charB)}${String.fromCharCode(charA)}|`;
- passCount--;
- charA++;
- charB++;
- if (passCount === 0) {
- break;
- }
- }
- if (passCount === 0) {
- break;
- }
- }
- console.log(print);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement