function d(){this.get=function(){this.getNum()}};d.prototype.getName=function(){return 3;};var d = new d();console.log(d.get());//undefined
function d(){this.get=function(){this.getNum()}};
d.prototype.getName=function(){return 3;};
var d = new d();
console.log(d.get());//undefined
为什么这里显示undefined?而不是3?求解答
function d(){this.get=function(){return this.getName()}}; d.prototype.getName=function(){return 3;}; var d = new d(); console.log(d.get());//undefined
2.1m questions
2.1m answers
63 comments
56.7k users