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
Why is undefined shown here? Instead of 3? Please answer
function d(){this.get=function(){return this.getName()}}; d.prototype.getName=function(){return 3;}; var d = new d(); console.log(d.get());//undefined
function d(){this.get=function(){return this.getNum()}};
What do you say
function d(){this.get=function(){return this.getName();}}; d.prototype.getName=function(){return 3;}; var d = new d(); console.log(d.get());
Compare for yourself
num name
this.getnum is changed to this.getname
function d(){ this.get= function(){ return this.getName() } }; d.prototype.getName = function(){ return 3; }; var d = new d(); console.log(d.get());
What do you say
Compare for yourself
num name
this.getnum is changed to this.getname