3 ms·
I find most JS written functionally (at least if it's done the right way) to be a lot easier to follow if you think of each functional "step" in the chain like
by dccoolgai 13y ago
I find most JS written functionally (at least if it's done the right way) to be a lot easier to follow if you think of each functional "step" in the chain like columns in a spreadsheet. E.g. when I see something like _(array).filter(...).map(...).reject(...).reduce() I like to think of taking a value and following it the way you would across a spreadsheet and think of filter, map and reject as "columns". I don't know if that will help, but it does for me.
- drewblaisdell 13y ago> E.g. when I see something like _(array).filter(...).map(...).reject(...).reduce() I like to think of taking a value and following it the way you would across a spreadsheet and think of filter, map and reject as "columns". This is the practical use of functional Javascript methods after they are written, though. Following the code in the filter/map/reject/etc functions themselves is a bit more difficult.