Thanks and you are right, reduce is not inherently better than a for loop. And if you use a for loop the right way, you are still able to write your code based on the functional programming principles, and if performance is really important it's better to use a for loop. I agree on all these arguments. So I changed the content of the blog to nuance the content of my earlier statements. Thanks for your contribution.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks and you are right, reduce is not inherently better than a for loop. And if you use a for loop the right way, you are still able to write your code based on the functional programming principles, and if performance is really important it's better to use a for loop. I agree on all these arguments. So I changed the content of the blog to nuance the content of my earlier statements. Thanks for your contribution.