13. Not


#1


https://www.codecademy.com/courses/javascript-beginner-en-qDwp0/2/4?curriculum_id=506324b3a7dffd00020bf661#


Oops, try again. It looks like your happy function returns false instead of true when programming is false


var programming = false;

var happy = function() {
  if(false){
return true;
  }
  else{
      return false;
  };
};


#2

You have wrong condition for if-else statement:

var programming = false;

var happy = function() {
   if (programming === false) {
      return true;
   } else {
      return false;
  }; // remove ;
};

So, condition is an expression that should returns boolean value:

condition
An expression that is considered to be either truthy or falsy..


#3

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