当有n++时候,返回值是123
function fun(n, b) {
console.log(b) //und123
return {
fn1: function (m) {
n++;
return fun(m, n);
}
};
}
var a = fun(0)
a.fn1(1);
a.fn1(2);
a.fn1(3);
function fun(n, b) {
console.log(b) //und000
return {
fn1: function (m) {
//n++;
return fun(m, n);
}
};
}
var a = fun(0)
a.fn1(1);
a.fn1(2);
a.fn1(3);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…