Password Generator | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Password Generator

Why is my password coming out as nan? I set the character limit to 8 but its still not working. https://code.sololearn.com/WTQ5iB2a8kU2

19th Apr 2022, 10:57 PM
Junior
Junior - avatar
3 Answers
+ 1
// Good Luck const characters = "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890!@#$%^&*()"; let rand = ""; while (rand.length < 8) { rand += characters[Math.floor(Math.random() * characters.length)]; } console.log(rand);
19th Apr 2022, 11:23 PM
SoloProg
SoloProg - avatar
0
https://youtu.be/cVPlU8nIJmI Do you know what is oop?
19th Apr 2022, 11:10 PM
Ian Munene
Ian Munene - avatar
0
ye it stands for object oriented programming
19th Apr 2022, 11:11 PM
Junior
Junior - avatar