Use an IIFE to Create a Module(funModules)

Tell us what’s happening:
Hi All,
I created a module that will wrap the two mixins isCuteMixin and singMixin but for some reason I am getting an error. It says Identifier expected?
Thanks for your help

Your code so far

let funModule =  (function(){
    isCuteMixin: function(obj) 
        obj.isCute = function() 
          return true;
        singMixin : function(obj)
          obj.sing = function() {
            console.log("Singing to an awesome tune");

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:

Move the { to the same line as the return. The JavaScript interpreter automatically inserts a semicolon after the return keyword, when written this way. Get in the habit of opening blocks or defining object literals the same way. It will save you much headache.

1 Like