Logical Operators: And help!


#1


help me!! i dont know what's wrong with this code :frowning:

// 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

return is a command statement. not a variable. We simply return value.


#3

I got it! Thank you so much!


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.