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

In what way is for different than an iterator?

In PHP you loop through an iterator with the foreach control structure.

In JavaScript you use for of.

In rust it’s for in.

What am I missing?



You're missing that I am an idiot and was mixing up iterators with functional style programming :D




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

Search: