2 ms·
I taught javascript to an older person once, and I think for-loops are one of those things that people who studied programming think "are not so bad", but it's
by RodericDay 11y ago
I taught javascript to an older person once, and I think for-loops are one of those things that people who studied programming think "are not so bad", but it's absolutely senseless and insane to outsiders.
I'm thinking
var output = [];
for (var i=0; i<listOfThings.length; i++) {
var thing = listOfThings[i];
var newThing = applyAction(thing);
output.push(newThing);
}
vs.
listOfThings.map(thing => applyAction(thing));
and even that is a little bit iffy.