reduce does not add items into the array but creating new properties on
Array object – you can’t use a string as an index into an array…
What you probably want is to return
Object from your
CLICK HERE to find out more related problems solutions.