Aug 8, 2017 · 1 min read
Eh, to be fair your ES6 example is overly verbose. Your slice example could simply be
arr.slice().sort( (a, b) => a.sort — b.sort ).map(item => item.num)which to me looks much more readable than having to understand a library’s code if in the future another developer unfamiliar with lodash were to take over the project. Not that the learning curve is insane, but still. Native when native is possible.
