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?
2 Answers
+ 1
empty object literal
used as initial value of reduce accumulator (obj argument of callback function)
+ 1
Lokesh Rathi You posted same question twice delete that