var tired= true;
var bored= false;

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


m getting "function doesnt return false when tired and bored are false"
what i am missing?


if tired and/or bored are true, the else clause run. normally the if condition would be true and run, but you use a ! causing a reverse (true becomes false)

if both are false, the if condition will be false, but thanks to your ! it becomes true. So either swap true and false, or remove the exclamation mark


can u plz gv me da format of the prgrmmng


nope, guidelines prevent me


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