3 ms·
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, sometim
by Buttons840 5y ago
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.