I didn’t mean to say anything that would make you stop reading, and I never meant to explicitly make a conclusion that using a for loop or iterating was *wrong*, but that being said I would posit that you can reframe the use-cases you’re talking about. For example, if you want to operate on every other item of the array, you could chunk and then map which is more expressive than using a for loop (in my opinion). Similarly, if you have an array of asynchronous actions (API fetching for example) I’m not sure what would be wrong with using
map or generating another array … you could map to an array of promises for example.
I don’t want to discourage you from using for loops or tell you that you’re doing anything wrong. I don’t think that’s the case. I just want to present an alternative case for a different paradigm.