function d(){this.get=function(){this.getNum()}};
d.prototype.getName=function(){return 3;};
var d = new d();
console.log(d.get());//undefined
为什么这里显示undefined?而不是3?求解答
某草草2017-05-19 10:48:15
function d(){this.get=function(){return this.getName();}};
d.prototype.getName=function(){return 3;};
var d = new d();
console.log(d.get());
自己对比下