Add a function to pre-existing code to generate a random password. Must also prompt user for length of password between 8 and 128 characters. If a number doesn't meet password length requirements, start process over. Finally must also prompt for Upper/Lower/Number & Special characters. Write the generated password into the div class card-body on index.html. Live demo here.
- General Info
- Technologies Used
- Features
- Screenshots
- Setup
- Usage
- Project Status
- Room for Improvement
- Acknowledgements
- Contact
- License
- Random password generator wasn't functioning. Created a password generator function for generatePassword().
- Previous button did nothing. Added multiple parameter prompts as well and now prints the final return of the generated password to a div card on index.html. Fail safe restarts the process if a invalid number is selected for the password string length in the array.
- Purpose is to fix pre-existing code, otherwise debugging. To get a better hands on experience with using arrays, prompts and dealing with user input for the first time.
- Undertaken because it's good practice.
- VSCode 1.76.2
- Chrome 112.0.5615.121
- macOS Mojave 10.14.6
- Upon button click, start list of prompts.
- First prompt for length 8 < 128, if not, fail and start over.
- Series of 4 Yes/No (defaulted to Yes) prompts for parameters: upperCase/lowerCase/numbers/specialChars set by user.
- Apply selected length to array and run the funtion, return the password and write it to the card on index.html.
N/A
To quickly create a random 8-128 customized password.
Project is: / complete /
Room for improvement:
- Gain a better understanding of math.floor and math.random.
To do:
- I can't be sure, but I believe this challenge is done unless we revisit it.
- This project was inspired by Manuel Campbell, his blog covers various functions using: Node.js, HTML and CSS, a random PIN code generator library, string methods and event handlers in JavaScript. Lots of various ways to accomplish the same task.
- This project was based on this tutorial.
- Many thanks to MDN Web Docs as well, I couldn't have figured out the var pwLength 8 < 128 parameters without it.
Created by nweekley84@gmail.com - feel free to contact me!
MIT