13. Not


#1

Where I made ​​a mistake in the code ? How should look like the right code ?

var programming = false;
var happy = function() {

if (!programming) {
console.log("Happened!!!");
} else {
console.log ("I don't no what it is");
}
};


#2

your code will run. have you try'd calling it by adding the call function //////-------- happy();


#3

What do I need to write it ?


13. not - calling a function (answer)
#5

Then, write an if/else statement inside happy so that happy returns true if programming is false and false otherwise.

Here's my code:

var happy = function() {
  // Add your if/else statement here!
  if (!programming) {
      return true;
  } else {
      return false;
  }
};

#6

Your code looks very valid, but if you don't meet the requirement of the console, or the exercise, it'll print an error message. If it's the look, rather than the functionality for the purpose of the exercise, i think @maxtirdatov code will work fine...regardless, your syntax for programming purpose is valid.


#7

var happy = function() {
// Add your if/else statement here!
if (!programming) {
return true;
} else {
return false;
}
};

Unfortunately it does not work.


#8

Haven't you accidentally removed the "programming" variable?