Build a Password Generator App - Build a Password Generator App

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

it helps to re-read the instructions when you are stuck.
For eg. You can try to re-read this one and compare it to what you did:

You should define a variable called password and assign it the result of calling the generatePassword function with a numeric argument that represents the desired password length.

i’m confused, because I thought that’s what i literally did

Your code above does not include the code they asked for in this step. Maybe you should read that instruction again but slowly and see if you can work out why I am saying this?

JEEZ! You guys sure are picky! I mean it still worked originally but I guess I’ll do it your way. It’s free for a reason…

but yeah i just put it on the outside instead. solved now

as a person who paid to get her B.Sc. in Computer Science, I promise you, it is not free because it is of any lesser quality than my University education. But, feel free to think whatever you want.

I think i’m probably just better in person compared to online learning, but I still appreciate it all. Thanks!

Hi @benU89 ,

One of the important things the freeCodeCamp curriculum attempts to teach is how to follow directions! :laughing: Details are important in development.

Happy coding!

I guess so, I need to work on that, cuz i hate following directions haha