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

Under the hood, 'for..in' just calls #each. Therefore, it is easy to make 'for..in' work with a custom collection: just define #each. And that is what you would do anyway if you were defining an Enumerable custom collection.


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

Search: