Tell us what’s happening:
I have no idea, it says i’m wrong, but on my end it looks fine? www.youtube.com/watch?v=Zs9JrZFUX4Y that’s how i feel right now.
Your code so far
function generatePassword (pram) {
let password = "";
const char = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','!','@','#','$','%','^','&','*','(',')'];
for (let i = 0; i < pram; i++) {
const math = Math.floor(Math.random() * char.length);
password += char[math];
}
return `Generated password: ${password}`;
}
console.log(generatePassword(6));
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:148.0) Gecko/20100101 Firefox/148.0
Challenge Information:
Build a Password Generator App - Build a Password Generator App