array.reduce is not a functin code example
Example: js array reduce error not a function
// These are the causes for the error I have personally encountered,
// hopefully it can help you too!
/* Could be:
(a). A missing or extra semicolon
(b). The array is not in the correct format (null or undefined?)
*/