I created a Password generator but I am getting a issue.before password undefine is written. | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

I created a Password generator but I am getting a issue.before password undefine is written.

https://sololearn.com/compiler-playground/WD6JD1cNEUz0/?ref=app

19th Mar 2024, 12:22 PM
Raj Singh
Raj Singh - avatar
3 Respostas
+ 2
Hi Raj Singh The 'password' variable is initially 'undefined' by default that's the reason 'undefined' is getting concatenated at the beginning of the generated password.To fix this, you can intialize 'password' variable to empty string like below. let password="";
19th Mar 2024, 12:45 PM
š˜•š˜‰
š˜•š˜‰ - avatar
+ 1
Thanks NB for help. have a great day.
19th Mar 2024, 2:41 PM
Raj Singh
Raj Singh - avatar
0
Welcome šŸ‘
19th Mar 2024, 2:49 PM
š˜•š˜‰
š˜•š˜‰ - avatar