|
|
|
|
|
by mst
1757 days ago
|
|
> Seems funny to argue for JavaScript's simplicity while using .map() and an anonymous callback function; a good ol' for loop would make it more clear what's happening. When you're doing a side effect free transform of some data, I find .map far clearer. A for loop would require .push type noise for that case and so personally I'd find that noisier and harder to skim read. Tastes vary, of course, but certainly it doesn't seem funny to me at all. |
|