function heresCriteria() {
    
      var length = parseInt (   //variable that stores the length of the password
        prompt("How many characters do you want your password to have?")
  
  );
        //Conditional statements regarding numbers and length -prompt will end if false
  if (isNaN(length) === true) {   
    alert ("Password length must include a number");
    return;
  }
        
  if (length > 128) {
    alert ("Password must be less than 129 characters");
    return;
  }
     
  if (length < 8) {
    alert("Password must be at least 8 characters");
    return;
  }

// Variables that store boolean regarding special characters, numbers, lower/upper case letters
  hasCapCharacters = confirm( "Would you like to include capital letters?" );

  hasLowCharacters = confirm ( "Would you like to include lowercase letters?");

  hasNumericCharacters = confirm ("Would you like to include any numbers?");

  hasSymbolCharacters = confirm ("Would you like to include any symbols?");

    //this will check if user doesn't include any of the below characters
    //if all are false, generator will end 
    
    if ( hasCapCharacters === false && hasLowCharacters === false && 
    hasNumericCharacters === false && hasSymbolCharacters === false 
       ){

        alert("Must choose at least one character")
        return;
    
} 
        //Object with keys and values for user input storage

    var passwordOptions = {
      length: length,
      hasCapCharacters, hasCapCharacters,
      hasLowCharacters, hasLowCharacters,
      hasNumericCharacters, hasNumericCharacters,
      hasSymbolCharacters, hasSymbolCharacters,

    };
        return passwordOptions;
}
//Function to prompt user to go through password options
Function to prompt user to go through password options
Function to prompt user to go through password options
function heresCriteria() {
      var length = parseInt (   
        prompt("How many characters do you want your password to have?")
  );
  if (isNaN(length) === true) {   
    alert ("Password length must include a number");
    return;
  }
  if (length > 128) {
    alert ("Password must be less than 129 characters");
    return;
  }
  if (length < 8) {
    alert("Password must be at least 8 characters");
    return;
  }
  hasCapCharacters = confirm( "Would you like to include capital letters?" );
  hasLowCharacters = confirm ( "Would you like to include lowercase letters?");
  hasNumericCharacters = confirm ("Would you like to include any numbers?");
  hasSymbolCharacters = confirm ("Would you like to include any symbols?");
    if ( hasCapCharacters === false && hasLowCharacters === false && 
    hasNumericCharacters === false && hasSymbolCharacters === false 
       ){
        alert("Must choose at least one character")
        return;
} 
    var passwordOptions = {
      length: length,
      hasCapCharacters, hasCapCharacters,
      hasLowCharacters, hasLowCharacters,
      hasNumericCharacters, hasNumericCharacters,
      hasSymbolCharacters, hasSymbolCharacters,
    };
        return passwordOptions;
}
function heresCriteria ( ) { var length = parseInt ( prompt ( "How many characters do you want your password to have?" ) ) ; if ( isNaN ( length ) === true ) { alert ( "Password length must include a number" ) ; return ; } if ( length > 128 ) { alert ( "Password must be less than 129 characters" ) ; return ; } if ( length < 8 ) { alert ( "Password must be at least 8 characters" ) ; return ; } hasCapCharacters = confirm ( "Would you like to include capital letters?" ) ; hasLowCharacters = confirm ( "Would you like to include lowercase letters?" ) ; hasNumericCharacters = confirm ( "Would you like to include any numbers?" ) ; hasSymbolCharacters = confirm ( "Would you like to include any symbols?" ) ; if ( hasCapCharacters === false && hasLowCharacters === false && hasNumericCharacters === false && hasSymbolCharacters === false ) { alert ( "Must choose at least one character" ) return ; } var passwordOptions = { length : length , hasCapCharacters , hasCapCharacters , hasLowCharacters , hasLowCharacters , hasNumericCharacters , hasNumericCharacters , hasSymbolCharacters , hasSymbolCharacters , } ; return passwordOptions ; }
Function to prompt user to go through password options
Function to prompt user to go through password options
//variable that stores the length of the password //Conditional statements regarding numbers and length -prompt will end if false // Variables that store boolean regarding special characters, numbers, lower/upper case letters //this will check if user doesn't include any of the below characters //if all are false, generator will end  //Object with keys and values for user input storage