12. Or - More on Control Flow in JS


The instructions are to create two variables, tired and bored, and set one equal to true and the other equal to false. And inside the nap function to create an if statement that returns true if either tired or bored, or both are true, and false otherwise.

My problem is that although my code does pass according to codecademy, I don't actually get anything returned.

Here is my code:

var tired = false;
var bored = true;

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

Thanks in advance :smiley:


Nevermind, I forgot to run it by using nap ();