function Class1(){
this.i = 1;
var that=this;
function nn()
{
return 21;
}
this.aa = function(){
nn();
}
this.bb = function(){
this.aa();
}
this.cc = function(){
this.bb();
}
}
var o = new Class1();
var b=o.cc();
alert(b); //undefined 而不是21
想请教一下alert(b)为什么不是21,而是undefined,难道私有方法不能使用return吗?
相关分类