Hacker News new | ask | show | jobs
by charrondev 408 days ago
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?

1 comments

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