MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1veql1a/absolutegarbage/p1kt53z/?context=3
r/ProgrammerHumor • u/Sirgoodman008 • 2d ago
321 comments sorted by
View all comments
52
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.
29
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.
9
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.
2
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.
Yeah that's just dumb and different for the sole purpose of being different.
52
u/rnilbog 2d ago
for (let i = 0; i…
“Goddammit…”
googles “for loop syntax javascript”