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

The reason to use each instead of for loops is for code consistency. Also there are custom objects which require you to use each to iterate.


for is defined in terms of each, so you can still use for on a 'custom object'




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

Search: