The goal was to create an application for the user to generate a unique secure password. The application is to allow customisation to the potential password in the way of variable length and being able to select and deselect different character groups.
The starter index.html and script.js were both edited and added to extensively, firstly assigning separate character groups to arrays as variables to allow access to each type separately; coding a prompt for the password length and a confirmation for each of the four assigned character types; effectively referencing the inputs in the script.js and assigning as variables icluding a resultant array concatenating arrays from all selected in the form; and finally a for-loop generating the password to be printed to the user.
A challenge were discovering I was required to define the constant for the resultant password in the correct scope and I learned that an if statement has its own scope which I managed to work my way around.
The functionality of prompts and confirms make it easier for both the coder and the user as separating each of the password's parameters into its own distinct step simplified the code and allowed for less error messages for the UI to display for when inputs were not suitable.
To access the deployed page, please click on the following link:
To access this application's GitHub repository, please click on the following link:
Enjoy! 😄