JS Assignment 14 The Class Prototype
Exit (2)

I’m having difficulty understanding how to solve the second exercise. I watched and read through the lesson, but can’t find where it teaches to add a method to a prototype.
Any help would be wonderful
https://repl.it/student/submissions/7128534

You are viewing a single comment. View All
Oluwiz (0)

Hi @Exit, just in case you still haven't found the solution.

You can just do this:

AnimalClass.prototype.speak = function() {
return this.name + ' says ' + this.noise;
};