Hello!
Seems that JsFiddle is blocking users from Russia, and I cannot see the OPโs version. Could you tell me what I am supposed to do in Task 4? I thought maybe
function Cat (name, breed, color, geeting) {
this.name = name;
this.breed = breed;
this.color = color;
this.greeting = function() {
console.log(`Hello, said ${this.name} the ${this.breed}.`);
}
}
const cat = new Cat ("Bertie", "Cymric", "white");
const cat2 = new Cat ("Elfie","Aphrodite giant","ginger");
cat.greeting();
cat2.greeting();
Yes, this is correct.
You can remove the greeting parameter from the function, because only name, breed and color are needed when creating a Cat object.