Tell us what’s happening:
Describe your issue in detail here.
**Your code so far**
let funModule = (
() =>
{return {
isCuteMixin: (obj)=>{
obj.isCute=()=>{true;};},
singMixin: (obj)=>{
obj.sing=()=>{console.log("Singing to an awesome tune");}}
};})();
but the time I delete the return
in the outer scope, this function will occur an error.
I mean that below code I showed is almost the same.
() => {return obj;}
() => obj;
so, why cannot delete the return
keywords?
**Your browser information:**
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Safari/605.1.15
Challenge: Use an IIFE to Create a Module
Link to the challenge: