Lesson 12-Or


#1

Something tells me that this is most likely far from correct. When I run code it says "Oops, try again. Did you declare a variable called tired?"
ReferenceError: Invalid left-hand side in assignment


var tired = true;
var bored = false;


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

#2

You don't need equal true in the if () you just need it to return true below.


#3

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