Tell us what’s happening:
Describe your issue in detail here.
i wanted to know , i have seen in a lot of functions we can add parameter whatever we want , we can name it anything but we also before used to give a argument to it when we used to call the function , now i get confused when we add a parameter of like in the forward example we have created a obj parameter but i dont know how it is being worked inside the function now, can u explained this plz, a function with a parameter which is being used but has now argument .
Your code so far
let isCuteMixin = function(obj) {
obj.isCute = function() {
return true;
};
};
let singMixin = function(obj) {
obj.sing = function() {
console.log("Singing to an awesome tune");
};
};
also in this code we have name parameter can u explain this plz
const names = [‘poppy’, ‘wes’, ‘kait’, ‘snickers’, ‘lux’];
const kaitIndex = names.findIndex(name => name === ‘kait’);
console.log(kaitIndex);
console.log(names[kaitIndex]);
const newNamesWithoutKait = [
…names.slice(0, kaitIndex),
…names.slice(kaitIndex+1)
//…names.slice(3)
];
console.log(newNamesWithoutKait);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Challenge: Object Oriented Programming - Use an IIFE to Create a Module
Link to the challenge: