Reduce a JavaScript array into an indexed object
I faced some code that uses lodash/fromPairs to build an indexed object: import fromPairs from "lodash/fromPairs"; function lodashReduce(arr) { return fromPairs(arr.map(item => [item, `my item is: ${item}`])); } But I know that ES6 has syntax that...