Продолжайте получать ошибку:
Должен добавить метод к прототипу с именем speak
Ожидаемый «DogsaysWoof» будет «Собака говорит Woof».
Думал, что прибил, но чего-то не хватает. Я помещаю пробелы "" между свойствами, но это все равно появляется "DogsaysWoof". Думаю, это потому, что мне не хватает ссылки на метод для прототипа, но, похоже, не имеет значения, что я там изложил. (Прямо сейчас это "говорит")
Я немного взволнован этим.
function exerciseTwo(AnimalClass){
// Exercise Two: In this exercise you are given a class called AnimalClass.
// The class will already have the properties 'name', 'noise' on it.
// You will be adding a method to the prototype called 'speak'
// Using the 'this' keyword, speak should return the following string:
// '<name> says <noise>'
// DO NOT create a new class or object
/*My ************************************************************** Code*/
AnimalClass.prototype.speak = function(says){
this.speak = 'says';
return this.name + '' + this.speak + '' + this.noise;
};
// Please write your code in the lines above
return AnimalClass;
}