0
about function
function groupById(array) { return array.reduce((obj, value) => { obj[value.id] = value; return obj; }, {}) } i want to known after return obj; {}) what is this?
1 Odpowiedź
+ 1
empty object literal
used as initial value of reduce accumulator (obj argument of callback function)