I am trying to resolve a problem but I need to understand prototype.
I was reading and I thought I got it, but I am still having some complications
function Person(name){
this.name = name;
}
Person.prototype.greet = function(otherName){
return "Hi " + otherName + ", my name is " + name;
}
var kate = new Person('Kate'); //name
var jose = new Person('Jose'); //otherName ???
so, is my mistake when I need to call the function ? or where is it ?
greet()on any of them?