News for hackers. Stuff that matters.
Re:Modern Javascript: Everything you missed over the last 10... by Buttons840 on Saturday May 15, 2021 @12:21PM (#27166537)
That is a valid opinion, I agree there are advantages to plain for loops. However, it is not a universal opinion and I would argue against the for-loop, sometimes. Some languages people love do not even have loops.

You never know what structure a for-loop will take, it could break early, skip items, build a new data structure, mutate a data structure, or all the above. If I see a map and a filter, I know exactly what each does.

I don't want to argue over which is better. Pros and cons. I just wanted to say that chaining and nesting array functions is not a reliable sign that someone is a "newbie", maybe they're just someone with different preferences.

There are no comments on this comment yet.