More on Control Flow in JS, 11. And


#1


More on Control Flow in JS, 11. And


It says that there is something wrong with the else statement, can anybody help? The exact error message is 'unexpected token else'. Thanks!


// Declare your variables here!
var hungry = true
var foodHere = true

var eat = function() {
  // Add your if/else statement here!
  
  if (hungry && foodHere); {
      return true; }
  else; {
      return false; }
};


#2

here:

if (hungry && foodHere); {

unnecessary semi-colon in this line, interrupting the if clause


#3

Thank you so much! That worked!


#4