Tell us what’s happening:
Since this is an immediately invoked function, shouldn’t it print “He is cute” to the console along with “Hey Jude”?
I’m not sure if you would create an object and then instantiate it to have access to the return object isCuteMixin.any propertites within the isCuteMixin?
I’ve never seen anything like this before. Sorry if I’m not making sense.
Your code so far
let funModule = (function () {
return {
isCuteMixin: function (obj) {
obj.glide = function() {
console.log("He is cute");
};
},
singMixin: function(obj) {
obj.fly = function() {
console.log("Hey Jude");
};
}
}
}) ();
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/object-oriented-programming/use-an-iife-to-create-a-module