More on Control Flow in JS Lesson 11 HELP


#1

var hungry = true;
var foodHere = true;
var eat = function() {

if(hungry && foodHere) {
return = true;
} else {
return = false;
}
};
Can anyone please tell me how I could fix my syntax because the system says that there is a "SyntaxError: Unexpected token ="
Would like help soon.


#2

The unexpected token error is right. You do either:

return true;
return false;

and not what you did.

I hope this helps! :wink:


#3

It did. thanks dude :slight_smile:


#4

You're welcome.

Have fun coding! :slight_smile:


#5

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