Lesson 12-Or


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


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


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