mootools/mootools-core — Issue #2169: `Array#filter` should store `this[i]` in a variable before calling the callback.
Author: jdalton
Created: 2011-12-13 03:01:27+00:00
State: open

`Array#filter` should store `this[i]` in a variable before calling the callback in case the callback modifies that value so it can push the stored value, not the modified one, to the result.

https://github.com/mootools/mootools-core/blob/master/Source/Types/Array.js#L30