Can help


#1


// Declare your variables here!
var programming = false;

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


#2

You had quite a number of syntax errors.

Your assignment was wrong.

Also,

you missed the keyword return and an opening curly bracket for your else statement.

Lastly, wrong positions of semi-colon.

See suggested code below:

var programming = false;

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

Hope this helps! :slight_smile:


#3

@shlomo9080,

= 1=

From
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators
under the header "Equality operators"
you will find the
!= Inequality operator intead of you using =!

= 2 =

if ( condition ) {
   //IF code-block
}
else {
   //ELSE code-block
}

= 3 =

You will have to use the return statement in both code-blocks !!!!


#4

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