求助一个 运行结果的疑问
首先定义个函数,如下:
function test(a) {
var a = a;
// console.log(a);
this.GetA = function () {
return a;
};
this.SetA = function (a) {
a = a;
}
} function playTest() {
var t = new test(1);
console.log(t.GetA());
t.SetA(2);
console.log(t.GetA());
t.SetA(3);
console.log(t.GetA());
}