Stuck in OR operation, I don't know what is wrong with this code


Hello everyone below is my code i don't know what is wrong in it. I used alert to check the value of tired variable but its showing false in nap function. Can anybody help with this?

// Declare your variables here!

var tired = true;
var bored = false;

var nap = function() {
// Add your if/else statement here!

if(tired || bored)
console.log("take a nap");
console.log("Continue working!!");


exactly which exercise is this? I would make a function call at the end:


otherwise, your function doesn't get executed. Currently the if condition is true, take a nap is printed to the console


Thanks. when i called the nap() function it works!!