I'm not sure what i'm supposed to be doing



I'm being told that I have a bad assignment on lines 6 and 7 and would appreciate help with my syntax.

var tired = true;
var bored = false;
var nap = function() {
if (tired || bored )
  { tired || bored = true;}
  else {tired || bored = false;}



the instructions says "return true" or "return false"

  if(tired || bored){
      return true;
      } else {
          return false; 

This tired || bored = true;} is no valid Syntax .


|| have a higher priority than = so you'll evaluate tired||bored first and then you have

true = true

meaning you have a value on the left of an assignment operator. So the first question would be why do you use an assignment operator at all better use a comparison operator like == or ===.


your if condition is correct:

if (tired || bored )

but then inside your if:

if (tired || bored ){
  return true;

and return false in your else.