function homeStates() {
  var statesLived = ['massachussets', 'ma', 'new york', 'ny', 'california', 'ca', 'minnesota', 'mn'];
  var guessNum = 0;
  var correct = false;

  while (guessNum < 6 && correct === false) {

    var stateGuess = prompt('Can you name a state Sharina has lived in, besides Washington?');
    stateGuess = stateGuess.toLowerCase();

    for (var i = 0; i < statesLived.length; i++) {
      if (statesLived[i] === stateGuess) {
        console.log('I am in the correct answer if statment with ' + statesLived[i]);
        alert('Yes! Sharina has lived in Massachussets, New York, California, and Minnesota');
        points += 1;
        correct = true;

      }
    }

    if (correct === false) {
      console.log('I am in the incorrect or else statement with ' + statesLived[i]);
      alert('Good try, but either check your spelling or try again!');
      guessNum += 1;
    }
  }
}
// Question 7: Discover one of several places I've lived in.
Question 7: Discover one of several places I've lived in.
Question 7 : Discover one of several places I ' ve lived in .
function homeStates() {
  var statesLived = ['massachussets', 'ma', 'new york', 'ny', 'california', 'ca', 'minnesota', 'mn'];
  var guessNum = 0;
  var correct = false;
  while (guessNum < 6 && correct === false) {
    var stateGuess = prompt('Can you name a state Sharina has lived in, besides Washington?');
    stateGuess = stateGuess.toLowerCase();
    for (var i = 0; i < statesLived.length; i++) {
      if (statesLived[i] === stateGuess) {
        console.log('I am in the correct answer if statment with ' + statesLived[i]);
        alert('Yes! Sharina has lived in Massachussets, New York, California, and Minnesota');
        points += 1;
        correct = true;
      }
    }
    if (correct === false) {
      console.log('I am in the incorrect or else statement with ' + statesLived[i]);
      alert('Good try, but either check your spelling or try again!');
      guessNum += 1;
    }
  }
}
function homeStates ( ) { var statesLived = [ 'massachussets' , 'ma' , 'new york' , 'ny' , 'california' , 'ca' , 'minnesota' , 'mn' ] ; var guessNum = 0 ; var correct = false ; while ( guessNum < 6 && correct === false ) { var stateGuess = prompt ( 'Can you name a state Sharina has lived in, besides Washington?' ) ; stateGuess = stateGuess . toLowerCase ( ) ; for ( var i = 0 ; i < statesLived . length ; i ++ ) { if ( statesLived [ i ] === stateGuess ) { console . log ( 'I am in the correct answer if statment with ' + statesLived [ i ] ) ; alert ( 'Yes! Sharina has lived in Massachussets, New York, California, and Minnesota' ) ; points += 1 ; correct = true ; } } if ( correct === false ) { console . log ( 'I am in the incorrect or else statement with ' + statesLived [ i ] ) ; alert ( 'Good try, but either check your spelling or try again!' ) ; guessNum += 1 ; } } }
Question 7: Discover one of several places I've lived in.
Question 7 : Discover one of several places I ' ve lived in .