Assessment wanted for Object basics 1, 2, 3 skills test

Hi, I would like to receive some feedback after finishing my third tasks :slight_smile:
btw, can i modify the content of the function (method) using dot or bracket notation?
Thanks so much for your time and kindness!

Object basics 1
Object basics 2
Object basics 3

1 Like

Hey, after reading your post I was not sure, so I tried doing in my self. The result is that you can modify the contents of a function (also called method) using the dot notation.

I’m sure there is a better way of doing it but that’s what I came up with:

changing methods (codepen.io)

Try searching the MDN modules there is probably an explanation somewhere in there.

1 Like

Hey, Max! Thanks! Yes, you are right, method, i forgot it!
I will check the link you left me! Thanks again! :slight_smile:

Hey I just noticed a mistake in the method in the third task. Instead of greeting: function() { console.log(Hello, said ${cat.name} the ${name.breed}); it should be greeting: function() { console.log(Hello, said ${this.name} the ${this.breed});. The name.breed would return undefined, as the property breed is not inside the name property.

Nice catch, @Karolina!
You are absolutely right :+1:

1 Like