It looks like your function doesn't return false when hungry is false


#1

Struggling to understand why my code is incorrect and where to return false when hungry is false.?

var hungry = true;
var foodHere = true;

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

This is the error message?
It looks like your function doesn't return false when hungry is false.


#2

You need to return true and false instead of "true" and "false".