Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
sztanpet
· 16y ago · 0 comments
The length operator(#) is a bit misleading when used with tables, you can only rely on it with array like tables with numeric indexes without holes in them (no nil values). Thats a big gotcha one should mention.
Comments
[–]
signa11
16y ago
yeah that is true. most of the time array would not have holes. when it does, using 'table.maxn(...)' works.