To be clear, this is plain javascript. The only lodash does here is the initial _. And you’re right, it does work just fine.
array.filter(f => true).map(f => f);
My understanding is that filter creates a new array, then maps that new array to another new array in final step.Does lodash do something differently? I'm not seeing anything in documentation for _.chain that says it does something differently.
https://github.com/lodash/lodash/blob/master/filter.js
https://github.com/lodash/lodash/blob/master/map.js
With a quick search I found this:
https://hackernoon.com/es6-lodash-native-javascript-nodejs-e...
Which seems to indicate little difference?