Javascript Array Reduce Initial Value Problem Mcquay Pipe