Understand the Immediately Invoked Function Expression (IIFE)

Understand the Immediately Invoked Function Expression (IIFE)


Tell us what’s happening:
The below code is failing with error “the function should be anonymous”.

However, it runs perfectly well in node.js and is, I believe, a valid use of the new ES6 arrow function.

Your code so far

(  () => {
  console.log("A cozy nest is ready");

Your browser information:

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

Link to the challenge:


Yes you are correct that your code is an IIFE using arrow function syntax, but the tests are not expecting arrow function syntax. You can check Github to see if anyone has brought up this issue before and create a new issue if it has not.