@varun/FaroffLightPenguin
Lua

No description

repl talk
1
2
3
4
5
6
7
function ipairs_print(t)
  for _, v in ipairs(t) do print(v) end
end

ipairs_print({1, 2, 3, nil, 4}) -- Prints 1, 2, 3
ipairs_print({nil, 1, 2, 3, nil, 4}) -- Prints nothing
ipairs_print({[0]=1, [1]=2, [2]=3}) -- Only prints 2, 3
Lua 5.1 Copyright (C) 1994-2006 Lua.org, PUC-Rio [GCC 4.2.1 (LLVM, Emscripten 1.5)] on linux2