|
|
|
|
|
by tracker1
168 days ago
|
|
In the specific example, both have side effects... if you really wanted to avoid them, you'd use .reduce, and even then, depends on the amount of data. More often than not, if you're doing these kinds of things in JS on in-memory data, you're probably doing something wrong and have bigger concerns imo. I say this as someone who loves JS since before The Good Parts book. |
|