mootools/mootools-more — pull request #1258 by SergioCrisostomo (2014-05-02 09:34:15+00:00)
Title: Use forEach in method "sum"

Array.sum returns `NaN` if a array item is undefined.

[10, 20, undefined, 30].sum(); // "NaN"

This PR follows @arian's [suggestion](https://github.com/mootools/mootools-more/issues/1114#issuecomment-4713846) and uses `.forEach`
Had to fix a spec that was expecting the array elements to be added from last to first.
This code adds from first to last.

fixes #1114