9/11 Did you set to hungry to equal true


#1

var hungry=true
var foodHere=true

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

};
console.log(foodHere=false)
console.log(hungry=true)
console.log(foodHere=true)
console.log(hungry=false)

when I set hungry to equal true on the last console.log, it says 'It dosen't return false when hungry is false.


#2

This doesn't really make any sense... nor do I know what you're trying to do. I suggest erasing that....

Also:

change that to

if(hungry && foodHere === true){
return true;
}
else{
return false;
}

As shown above, you must remember that true and false are BOOLEANS. Meaning that they shouldn't be a string.