Logical operators


what am i doing wrong? I keep getting the same message: "Oops try again. It looks like your function doesn't return false when hungry is false. Please help!!!

var hungry = true;
var foodHere = true;

var eat = function() {
if (hungry && foodHere) {
eat ();



You will have to use the return statement instead of the console.log()
You will have to =return= the _Boolean Value true or false
instead of your string Value "true" or "false"

As the return statement will only =return= the Value with NOdisplay
you will have to call the eat =function=

console.log( eat() );


@leonhard_wettengmx_n - Thank you very much. It did work now.