function d(){this.get=function(){this.getNum()}};
d.prototype.getName=function(){return 3;};
var d = new d();
console.log(d.get());//undefined
为什么这里显示undefined?而不是3?求解答
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你说呢
自己对比下
num name
this.getnum改成this.getname