Untitled

Run Settings
LanguageLua
Language Version
Run Command
array = {"Lua", "Tutorial"} function elementIterator (collection) local index = 0 local count = #collection -- 闭包函数 return function () index = index + 1 if index <= count then -- 返回迭代器的当前元素 return collection[index] end end end for element in elementIterator(array) do print(element) end
Editor Settings
Theme
Key bindings
Full width
Lines