A simple password generator with prompts.
Click here for the live website.
For this assignment, the class was given some basic HTML, CSS, and Javascript to work with. The generator was not operational, and there were no prompts to guide the user. The criteria we were given was:
- A randomized password must be generated based on the user's preferences.
- The user must be given a series of prompts to create a password based on character length and whether or not they wish to use lowercase, uppercase, numeric, or special characters.
- The prompts would have validation to make sure the user selects at least one character type.
- The prompts would also not allow the user to select a character length outside of 8-128.
- The generated password would be either written to the page, or appear in an alert.
- The app needed to be hosted by Github Pages and live.
Using prompts, alerts, while loops, and a for loop, I was able to piece together this app. I learned about prompts and how they can be saved to a variable that is usable throughout a program. The loops gave me the most trouble, as their functionality often produced unexpected results, but I figured it out. Now that this is complete, I feel more confident in using both for and while loops. I look forward to finding more uses for them in the future.