Hacker News new | comments | ask | show | jobs | submit login
An adventure in sparse arrays (remysharp.com)
18 points by fagnerbrack 5 months ago | hide | past | web | favorite | 1 comment

Observation: The way JS handles "holes" in sparse arrays is similar to how Lua resolves non-existent table entries to nil. This can be interesting when people don't know the difference between pairs, ipairs and for 1, #tbl iterations, when the table contains a nil value and the table indexing (index or key) may be unknown.

Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact