This was originally posted as a Twitter thread: https://twitter.com/chrisachard/status/1173750491458789378
Have you heard about map, filter, and r...
For further actions, you may consider blocking this person and/or reporting abuse
Thank you for your clear voice and explanation. Map and filter was easy to understand at least at this stage, but I couldn't digest reduce. like what is the previous loop and next element!
Anyway this article was really useful. Thank you
Great summary! I wrote about reduce recently as well: dev.to/worsnupd/everything-you-nee... It's cool to see how a lot of Array prototype methods are just special cases of reduce.
Yep! reduce is super powerful (which is why it can be so confusing!)
This is a great breakdown, another big benefit (which you mentioned near the beginning) is that it returns you a new instance of an array instead of mutating the original one.
Yes, definitely - I didn't have the space to really expand on that (maybe a part 2!), but these three really shine when you want to not mutate data.
This is such a great summary. I'm a bit late to using reduce, but as I use it more, I'm realizing how powerful it is
Thanks! Glad it was helpful.
Exactly:
reduce
is something that I thought wasn't great, UNTIL I started just using it. Now I use it all the time! It's really great for condensing a lot of logic down into just a few lines.Hi Chris, going to include the youtube channel I just created to help the community as well if you do not mind. I am trying to release one vid a week. Thank you and this article is a great crash course indeed. I can see enormous time and effort you put in.
youtube.com/channel/UCFIwa5Eqf4kN1...
Very nice article Chris!! It's great how you have summarized these 3 methods that can make it easily for developers.
Thanks! Glad you liked it :)
I love your articles!
So concise, well written and easy to follow, great work! 👏
Thanks! It's fun to try to break something down to just a few points. I always end up learning a ton myself while writing them 😃
Thank the explanation is really clear
I'm forwarding this to anyone who's still confused. It's the best!
Thank you for write it!!
I still confuse about Array.prototype.splice() 😅
Yeah, splice is confusing :) Maybe I'll try to do a writeup on that in the future!
Great article, good expliation and the images help to much.
Hey, A great knowledgeable post, Thanks
Can you please tell me the name of your editor font ? i really like that
Glad you liked it!
It's the "Menlo" font :)
Great explanation! Hope to keep seeing posts like this in the future :)
I keep forgetting how map, etc works and have referred to this resource at least 5 times already. It is very helpful!
Thank you, that's a great overview!
Awesome post Chris. Loved the way you presented. looking forward to the other posts of you! :)
Thanks!
It is very visual, I will try it in Quokka to see the run-time code and understand this :) love this post.