Hacker News new | past | comments | ask | show | jobs | submit login
An adventure in sparse arrays (remysharp.com)
18 points by fagnerbrack on Sept 15, 2018 | hide | past | 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.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: