The idea of this post is to show you the minimum set of methods you need to deal with to get away with any array-related problems you might encoun...
For further actions, you may consider blocking this person and/or reporting abuse
ehm... the last part is in Italian ^_^
Haha very nice. I must have published the wrong draft. Gonna correct it immediately.
Done, thank you @mikedepetris . Pizza time now!
"If find it very handy" --> "I find it very handy"
anyway pizza is always the answer.
This is great and usefult writing Walter, thank you.
Thanks for all the detail Walter. Was wondering if people use Lodash these days as a more intuitive way of understanding how reduce works. I had a use case for Lodash and wrote an AWS Lambda function with CRUD against an AWS S3 json file store.
I use Lodash quite a lot, especially for the uniqBy and groupBy array methods. And also for its debounce and throttle. I actually wanted to write a paragraph for lodash in this post but in the end I decided against.
Thanks, this is good to know because I do not write this kind of code too often. I still have trouble fully understanding the Reduce syntax because perhaps I am not that good at JS anyway. I am an SQL developer. Lodash seemed more user friendly.
concat() method is missed
concat is missing because I never use it. The point was to show what I personally use the most.
I'd rather do as: var array3 = [...array1, ...array2] instead of using concat. I'm just more used to the '...' operator since it's also useful with objects.
reduce
is the king of all of these. Super useful for many thingsIt is very powerful... It isn't just that easy to bear in mind its syntax at the beginning... but when you get it, it's so cool put it in your code :)