garageScript / curriculum

GarageScript Curriculum
21 stars 164 forks source link

JS2 problem 9: Add a test case where there is no initial accumulator #341

Closed sonnysasaka closed 3 years ago

sonnysasaka commented 4 years ago

To match with the expectation of JavaScript's native reduce() function, this adds a test case which doesn't pass initial accumulator.

sonnysasaka commented 4 years ago

Thanks for the review. Didn't realize that the same test has been added before. In that case, I will just add more description to it. Please take another look.

sonnysasaka commented 3 years ago

Seems like a duplicate. Closing.