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…
I usually work on macs, so I use homebrew to install/update node.
On other systems I would suggest using whatever the standard package manager is as recommended here: https://nodejs.org/en/download/package-manager/#arch-linux
This might involve using
sudo in some cases or installing as root, but you shouldn’t do
sudo npm anything.
I don’t agree with this. I think that I presented my reasons exclusively using use-cases. If you have counter use-cases where a
for loop is superior to
.map, I am interested in hearing them — although I did not mean to imply that
for loops need to be avoided at all costs. There may be scenarios where they are better.
I don’t want to shy away from the critical observations of SO since I think that these need to be addressed and corrected. Some behaviors are indeed indefensible, and it was never my intention to defend them.
I’m trying to defend SO as a whole and a platform. It’s done and continues to do a lot of positive, and I think that…
I’d be more than happy to do away with downvotes, but I don’t agree that everyone who downvotes does so for selfish reasons. I was trying to make that clear with my interpretation of how downvotes are used (whether or not that’s how they should be used).