99% of the time I see usage of Array.prototype.some and Array.prototype.reduce, it would have been much more readable with a manual loop.
-
Show this thread
-
This is the example that prompted the tweet. #1 is way more readable to me, do others agree? All the usage I've seen has been similar in readability to this.pic.twitter.com/OVEfJCHQyI
57 replies 4 retweets 97 likesShow this thread -
Replying to @sebmck
While we’re here I’ll throw in something even more inflammatory. I like this because it lets me “name” the return value and I don’t need to look back at the function name to remember what true or false means. *ducks*pic.twitter.com/Ue4rEDSwJS
4 replies 3 retweets 26 likes -
Replying to @dan_abramov
This is actually the exact pattern I use when I don't have the loop in it's own function.
1 reply 0 retweets 7 likes
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.
he/him 