this post was submitted on 29 Feb 2024
109 points (100.0% liked)
196
16442 readers
1894 users here now
Be sure to follow the rule before you head out.
Rule: You must post before you leave.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
What the fuck kind of JavaScript fuckery is
for (; ; i++)
i is already initiated so the first statement isn't necessary so it's empty.
The loop is ended with a conditional break statement so the loop end criteria isn't necessary so it's empty.
We want each iteration to increment i so it's i++
That's how you end up with (;;i++)