I have code following like this:
function Person() {
this.name = '123';
this.age = 123;
}
Person.prototype.load = function() {
console.log(this.name + " test ");
}
var p1 = new Person();
console.log(p1.load());
the console output two news. One is 123 test
, the other is undefined
.I wonder where is undefined
comes from?