Creating a password generator using JavaScript

Started by TaylorBee, Aug 14, 2024, 04:33 PM

Previous topic - Next topic

TaylorBee

Hello, I am very new to learning JavaScript and I am completely stuck at trying to figure out one of my first exercises. It is password generator. I have the HTML, CSS set up. but my javascript code just isnt working for me.

The critia:

Once you have been redirected to the web-page, click on the "Generate Password" button
You will be prompted with a series of questions regarding your password criteria (note, at least one must be selected, or else an error will pop up and the prompts will restart), including:
The desired password length (on the condition that it is between 8 and 128 characters long)
Whether you want the password to contain uppercase letters
Whether you want the password to contain lowercase letters
Whether you want the password to contain numbers
Whether you want the password to contain special characters
When all prompts are answered, you will be provided with a password which is generated according to your responses

gcnyezmet

#1
For your JavaScript, make sure you're grabbing all the inputs users provide. For example, you need to check if they want numbers or special symbols in their passwords and then make sure your code adds these into the password it creates.
If coding this from scratch seems a bit much right now, you could also try out an existing tool. This can be a great way to see how a password generator free works on the inside.

Quick Reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it has been approved by a moderator.

Name:
Email:
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

Shortcuts: ALT+S post or ALT+P preview