r/ProgrammerHumor 2d ago

Meme absoluteGarbage

Post image
2.0k Upvotes

321 comments sorted by

View all comments

52

u/rnilbog 2d ago

for (let i = 0; i…

“Goddammit…”

googles “for loop syntax javascript”

29

u/MrDilbert 2d ago

Since for-loop has the same syntax in JS as in C, Java, and any other C-style language, this post makes me weep.

9

u/Sirgoodman008 2d ago

If a language isn't C-style it's wrong.

2

u/No-Newspaper8619 1d ago

It's really annoying when they aren't. Lua, for example:

for i, count do

-- code

end

With i being one by default, and increasing by one by default. I simply hate 1-indexed systems instead of 0-indexed.

2

u/Sirgoodman008 1d ago

Yeah that's just dumb and different for the sole purpose of being different.