I feel like you haven’t really rid yourself of the imperative thinking mindset here.
Dan Wilson
31

Thanks for the feedback! ^^

I do agree that it should be possible to make it less imperative and, while I do not state in this article, I also believe that a more obvious approach that lacks “functional purity” without libraries is better to understand for newcomers to javascript/programming hence that approach.

While libraries like lodash are great and facilitate a lot while developing, for teaching/learning purposes they obfuscate logic and force you to go out of your way to learn “yet another method” so I try to avoid using them in the articles were they aren’t the main focus.

If you have a native alternative that still keeps the code readable and understandable it would be very welcomed.