ReactiveX / learnrx

A series of interactive exercises for learning Microsoft's Reactive Extensions Library for Javascript.
1.4k stars 292 forks source link

Reduce implementation on exercise 16 is wrong #161

Closed ottonascarella closed 7 years ago

ottonascarella commented 7 years ago

Reduce implementation is returning:

return [accumulatedValue];

The javascript implementation of reduce returns only accumulatedValue.

pointatnick commented 7 years ago

From the exercise description:

Take note this is different from the reduce in ES5, which returns a value instead of an Array!