What is wrong with this code?


what is wrong with this?


Try to call your function:

nap(tired, bored);


I'm having the same problem

here's my code

// Declare your variables here!
var tired = true
var bored = false
var nap = function() {
// Add your if/else statement here!
if (tired == true || bored = false) {
return true
} else {
return false


i did


don't use console.log It just wants the return


That's why my code doesn't use the console.log


no, i only used it to make sure the function is returning true, and i were right. My code isnt wrong


okay then why did you show us that we didn't need to know that


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

You assigned bored to false. Remove it. And call function nap() at the last line.


ok I'll try that thanks


Remove the parameters from the nap function. I had the same problem. Leave the parenthesis empty.


can you please show me the complete code? i dont get it


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