Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Don't objects function as hashtables? var v = {"a": 1};


I think the only real restriction is that you can't use arbitrary objects as keys - only strings or things that easily convert to strings (such as numbers).

See: http://ajaxian.com/archives/true-javascript-hash-table

Personally, I've never really regarded this as much of a problem.




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

Search: