More on Control Flow in JS - Or


#1

What is the problem with my syntax here?

var tired = true;
var bored = false;

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


#2

this line

if(tired || bored === true;

you should close the if condition with } and remove the ;

if (condition) {

}
else {
}

#3

I strongly recommend to use the developer tools feature in Google Chrome or Firefox browsers for better understanding. They support code debugging as well.