And - what is my broken mind doing wrong?


#1

Getting quite burnt out and hit a wall haha. What am I doing wrong here? It must be something idiotic but I'm just a bit too tired to figure it out myself. Any help would be much appreciated.

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

var eat = function() {
if (hungry && foodHere){
console.log("Continue");
} else {
console.log("no");
}
// Add your if/else statement here!

};


#2

The instructions want you to return true or false in body of the if/else

in your case you are doing console.log("continue")

Try this here

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(eat())