"no problem? thats a problem"


#1



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


apparently my code works perfectly but thats a problem somhow


var programming = false

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


my error states:
"Oops, try again. It looks like your happy function returns false instead of false when programming is false"


#2

Illegal expression in the condition. We cannot make a comparison with an assignment operator, =. All we really want to do in this expression is negate whatever boolean value programming is set to.

Consider,

programming = false;
console.log(programming);    # false
console.log(!programming);   # true

So,

if (!programming) {

#3

huh, i dont really get it but doing that worked so ok. thanks


#4

There are 10 kinds of people who understand binary logic. Those who do, and those who don't.