Array reduce vs chaining vs for loop: A comparison of different approaches to operating on an array https://kentcdodds.com/blog/array-reduce-vs-chaining-vs-for-loop … Which would you choose?
-
Show this thread
-
Replying to @kentcdodds
I think imperative looking code is good, so I'd probably end up with something that looks like this. (I'd not build a `commands` array if we were going to run each command sequentially.)pic.twitter.com/is7RkxgAv6
1 reply 0 retweets 1 like
Replying to @sebinsua @kentcdodds
That said, I completely agree with your comment in the article that people apply irrelevant constraints on problems. I'm just showing my particular set of personal opinions here.
11:58 AM - 14 Jan 2020
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.