js/app.js
//checks if user prompt can get the y/n answer, but makes sure its y/n
checks if user prompt can get the y/n answer, but makes sure its y/n
checks if user prompt can get the y / n answer but makes sure its y / n
function questionFour() {
  var meatEater = prompt('Does Alex consume animal products?');
  meatEater = meatEater.toLowerCase();
  console.log('Does Alex consume animal products?; ' + meatEater);
  if (meatEater === 'y' || meatEater === 'yes') {
    alert('Well kinda, he does consume dairy, but he doesn\'t eat meat');
    correctGuesses = (correctGuesses + 1);
  }
  else if (meatEater === 'n' || meatEater === 'no') {
    alert('Sorry, he is not that hardcore, he just doesn\'t eat meat');
  }
  else {
    alert('I am not a very smart program, please keep responses to yes/no y/n.');
  };
}
function questionFour ( ) { var meatEater = prompt ( 'Does Alex consume animal products?' ) ; meatEater = meatEater . toLowerCase ( ) ; console . log ( 'Does Alex consume animal products?; ' + meatEater ) ; if ( meatEater === 'y' || meatEater === 'yes' ) { alert ( 'Well kinda, he does consume dairy, but he doesn\'t eat meat' ) ; correctGuesses = ( correctGuesses + 1 ) ; } else if ( meatEater === 'n' || meatEater === 'no' ) { alert ( 'Sorry, he is not that hardcore, he just doesn\'t eat meat' ) ; } else { alert ( 'I am not a very smart program, please keep responses to yes/no y/n.' ) ; } ; }
checks if user prompt can get the y/n answer, but makes sure its y/n
checks if user prompt can get the y / n answer but makes sure its y / n