#2
sunus2018-08-30 11:27
|
function newCounter()
n = 0
n = n + 1
return function()
n = n + 1
return n
end
end
counter = newCounter()
print(counter())
print(counter())
为什么输出为 1 2
function newCounter()
n = 0
n = n + 1
return n
end
counter = newCounter()
print(counter)
print(counter)
输出为 1 1 这两种输出的数据为什么不一样,求大神解答