Hacker News new | ask | show | jobs
by Bimos 17 days ago
I'm super confused. In your example, ++i is equivalent to (i+1) and the loop updates i itself. But with the syntax in the blogpost, i is only initialized, and it is the ++i that updates the value?
2 comments

Copy paste error, too late to update the comment, it should be a plain i.
Yes. You don’t sound that confused?