rmurphey / js-assessment-answers

125 stars 84 forks source link

sum series #24

Closed kyleiwaniec closed 9 years ago

kyleiwaniec commented 9 years ago

given that the array in the test is a series starting at 1, a more efficient solution would be to sum the series. Obviously, this only works for that kind of series, so this is just an alternative solution, and not a generic sum function for any number array.

ashleygwilliams commented 9 years ago

hi @kyleiwaniec! thanks for the suggestion. i think, however, because it isn't an answer for a generic array, which is generally what we are testing, we are not going to merge.

a way to show alternative answers is something that might be a future feature for this, however. please share ideas if you have any!