13: Not. Is this true?


#1

Am I doing this right?

programming = false

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

I got the green, but I was wondering if my coding is right. It returned false on my screen.


#2

the false shown on your screen is the value of programming, which is false (you set it on line 1)

codecademy echoes the value of the last variable, and your function doesn't execute since you don't call it, if you call your function and log the returned result to the console:

console.log(happy());

you will see true :smiley:


#3

Thank you kindly sir.


#4