Answer the question
In order to leave comments, you need to log in
What do they want from me?
Mastering prototypes to understand exactly how classes work in ES6.
I'm going through tests.
Got this:
// Поправить код, чтобы функция приветствия возвращала ожидаемое значение
function Person(name){
this.name = name;
}
Person.prototype.greet = function(otherName){
return "Hi " + otherName + ", my name is " + name;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question