'Not' problem


#1


Hi everyone, could someone tell me what's wrong here?

programming=false

var happy = function() {

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

};


Replace this line with your code.


#2

Your if condition, when you want to say that something is not equal the something else, the operator to use is !==.
For your return statements, you can simply just do return true or return false as happy is your function and not a variable (so you can't just assign a value to it).


#3

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