|
|
|
|
|
by nefitty
1584 days ago
|
|
I basically rely on map 80% of the time for iteration. I do have to spend some mental cycles on deciding where to go if I needed to break or skip elements. That was until I discovered the beautiful .flatMap() trick of returning an empty array to skip or exclude an index item. Is it bad to use map? |
|
So if you're using map sensibly, no there's nothing wrong. But I don't like the dogma I read a lot which is "use map always" because it leads to inexperience developers using it in the wrong circumstances.