From b3fabb48591698f1dbd7364f5f5e59e5a8ebe906 Mon Sep 17 00:00:00 2001 From: Vishwajeet Kushwaha Date: Wed, 25 Sep 2024 07:14:53 +0530 Subject: [PATCH] Update app.js --- Password_Generator/app.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Password_Generator/app.js b/Password_Generator/app.js index 7aba47d..d6dc5d8 100644 --- a/Password_Generator/app.js +++ b/Password_Generator/app.js @@ -8,10 +8,7 @@ const allchars = uppercase + lowercase + number + symbol; function create() { let password = ""; - // password += uppercase[Math.floor(Math.random() * uppercase.length)]; - // password += lowercase[Math.floor(Math.random() * lowercase.length)]; - // password += number[Math.floor(Math.random() * number.length)]; - // password += symbol[Math.floor(Math.random() * symbol.length)]; + while (password.length < length) { password += allchars[Math.floor(Math.random() * allchars.length)];