4 ms·
Personally, I would rather see the first version with better variable names. I always find that map() methods tend to obscure the purpose of the values whereas
by bruxis 10y ago
Personally, I would rather see the first version with better variable names.
I always find that map() methods tend to obscure the purpose of the values whereas a simple appears more explicit.
- z5h 10y ago"map", "select", "reduce", "flat_map" and the like make your intention visible upfront. "each" just tells me you're doing "something" with each item. Not sure how giving less information is preferred over being explicit, but hey, whatever works for you.