Assessment wanted for Object basics 1 skill test. (Tasks 1-4)

Assessment wanted for Object basics 1 skill test. (Tasks 1-4)

Link to task: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Test_your_skills:_Object_basics#object_basics_1

Links to my code:
Task-1: https://jsfiddle.net/EiNzp/7bndo03z/1/
Task-2: https://jsfiddle.net/EiNzp/akrdqbe3/1/
Task-3: https://jsfiddle.net/EiNzp/t9cnky45/1/
Task-4: https://jsfiddle.net/EiNzp/thm258yw/2/

Thanks :wink:

Congrats, @EiN!

All four task are correctly solved.

Michael

1 Like

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();

but it doesnโ€™t work in live code.

Hi @MrBtr

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.

Have a nice day,
Michael