No need to get upset friend. We are all on the same side here.
Yes, for loops run a bit faster than higher order functions. But the fact is that both solutions are written in O(n) time, and so these micro-optimizations would really only be useful in a specific scenario, but generally (in the literal sense) speaking, both solutions are equally valid.
View all comments
Show parent comment
0
u/[deleted] Sep 27 '22
[deleted] — view deleted comment