Lua 中的迭代器


Author: yifei / Created: May 30, 2017, 9:42 p.m. / Modified: May 30, 2017, 9:43 p.m. / Edit

Lua中有两种for语句,最基本的是

for i = 1, 10 do
    print i
end

还有一种是for in语句

for I in pairs(t) do print I end


有任何问题可以发邮件到 kongyifei (at) gmail.com 讨论