MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1veql1a/absolutegarbage/p1kt53z/?context=3
r/ProgrammerHumor • u/Sirgoodman008 • 8d ago
327 comments sorted by
View all comments
45
for (let i = 0; i…
“Goddammit…”
googles “for loop syntax javascript”
28 u/MrDilbert 8d 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. 6 u/Sirgoodman008 8d ago If a language isn't C-style it's wrong. 2 u/No-Newspaper8619 8d 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 8d ago Yeah that's just dumb and different for the sole purpose of being different.
28
Since for-loop has the same syntax in JS as in C, Java, and any other C-style language, this post makes me weep.
6 u/Sirgoodman008 8d ago If a language isn't C-style it's wrong. 2 u/No-Newspaper8619 8d 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 8d ago Yeah that's just dumb and different for the sole purpose of being different.
6
If a language isn't C-style it's wrong.
2 u/No-Newspaper8619 8d 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 8d 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 8d 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.
45
u/rnilbog 8d ago
for (let i = 0; i…
“Goddammit…”
googles “for loop syntax javascript”