Oops, try again. Your code caused the following error: RangeError: Maximum call stack size exceeded


#1

I dont know where is the problem?

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

// Add your if/else statement here!
if( happy(!programming)){
return true;
console.log("true")
; }
else{
return false;
console.log("false");
}
};


#2

@peishi30012451,

With

if( happy(!programming)){

you are calling the =happy= function within the function....
a so-called recursion.

When you use recursion
you should have a precise defined START and END,
otherwise you will run into this Maximum call stack exceeded.....

So change your IF-condition into

if (!programming) {