Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
avaarm committed Oct 6, 2021
1 parent 340cc9c commit af4d727
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 12 deletions.
26 changes: 26 additions & 0 deletions .gitignore
@@ -0,0 +1,26 @@
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -4,8 +4,9 @@

## Description

Password Generator is a front-end application that allows the user to receive a randomly generated password after the user
specifies particular criteria for the password.
My first front-end/ client-side javascript application. As the only programming language native to web browsers, JavaScript is used all over the web and I was able to see first hand at how versatile it can through this application.

I modified starter code to create an application that enables employees to generate random passwords based on criteria that they’ve selected. This app runs in the browser and features dynamically updated HTML and CSS powered by JavaScript code that I wrote. It has a clean and polished, responsive user interface that adapts to multiple screen sizes.

## Table of Contents

Expand Down
10 changes: 0 additions & 10 deletions script.js
Expand Up @@ -5,22 +5,16 @@ var answerNumber;
var answerCharacter;
var answerUppercase;
var answerLowercase;


// A list of values the program has to go through in order to generate a random password
// Numeric characters
number = [1, 2, 3, 4, 5, 6, 7, 8, 9];

// Special characters
character = ["!", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", "\:", "\;", " < ", "=", " > ", " ? ", "@", "[", "\\", "]", " ^ ", "_", "`", "{", "|", "}", "~"];

// Upper and lower case letters
lowerLetters = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
upperLetters = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];

// a variable that will be used to add the various selections/ criteria chosen by user
var choices;

// Start function to generate password
function generatePassword() {
// Asks for user input
Expand Down Expand Up @@ -113,16 +107,13 @@ function generatePassword() {
var newPassword = password.join("");
UserInput(newPassword);
return newPassword;

}
// This puts the password value into the textbox
// Changed function input to use textcontent
function UserInput(newPassword) {
document.getElementById("password").textContent = newPassword;

}


//////////////////////////////////////////////////////////////
// DO NOT TOUCH THE CODE BELOW
//////////////////////////////////////////////////////////////
Expand All @@ -136,7 +127,6 @@ function writePassword() {

passwordText.value = password;
}

// Add event listener to generate button
generateBtn.addEventListener("click", writePassword);

Expand Down

0 comments on commit af4d727

Please sign in to comment.