Anoynmous (IIFE)

Tell us what’s happening:
The console keeps telling that there is a reference error when the challenge explicitly saif to make the function anonymous.

Your code so far
(function() {
console.log(“A cozy nest is ready”);
})();

makeNest();


(function() {
console.log("A cozy nest is ready");
})();

makeNest();

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36 OPR/67.0.3575.130.

Challenge: Understand the Immediately Invoked Function Expression (IIFE)

Link to the challenge:

You made the function anonymous but you’re still calling makeNest(), which is no longer a defined function. You need to remove that function call.

1 Like

You’re referencing the makeNest() function when you didn’t define it hence the error.