12. Or – STUCK ON THIS TOPIC


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/javascript-beginner-en-qDwp0/2/3?curriculum_id=506324b3a7dffd00020bf661

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

SyntaxError: Unexpected token )



Replace this line with your code. 
// Declare your variables here!


var bored = false || true;
var tired = true || false;

var nap = function() {


if(){
return true;
}else{
return false; 
}
};
eat();


#2

Hi @jas_0131, take a look at your if statement:

Why are we getting this error: SyntaxError: Unexpected token ) ? Because there’s no condition within the parentheses ( ) after if. Do you know what I mean?

I’ll snip out some of the instructions for you:

create an if statement that returns true if either tired or bored.

The instructions give a pretty good idea on what to do. :slight_smile:


#3

I finally understood the topic thanks!!


#4

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