163
rated 0 times
[
170]
[
7]
/ answers: 1 / hits: 22961
/ 11 Years ago, thu, july 18, 2013, 12:00:00
Question:
Why does the greet function not return the expected value?
Code:
function Person(name){
this.name = name;
}
Person.prototype.greet = function(otherName){
return Hi + otherName + , my name is + name;
}
How do I answer this? I create a new person then what do I do?
var John = new Person(John);
More From » javascript