PURPOSE
Take a starter code and make it so that when the button 'generate password' is clicked, a random password is generated with constraints that the user input, such as length, and what types of characters are utilized.
Summary
I first made functions that would work to determine the length of the password based on user input.
I continued to make functions that would work to randomize whatever characters the user chooses to implement in the password.
In the function, it works by prompting the user for the length and characters wanted in the password. An array is initialized for the password, and a while loop runs until the length of the password it met. If the user wants to use a specific type of character, if statements work to implement that function specified for the type of character, and push them into the array. Once the length is met, the while loop stops, and the array of random characters is shuffled again utilizing the fisher yates method of shuffle. This randomized order of the array is output into a string, and the function stops by returning this string.
This string is then used in the given function writePassword, and upon clicking the generate password button is displayed in the box on the screen for the user to utilize.
SCREEN CAPTURE OF WEBPAGE
The image below shows the working interface if the user chose 34 characters, and all character types.
LINK TO DEPLOYED APPLICATION