andrewplummer/Sugar — Issue #89: [...].each and {...}.each have different order in parameter
Author: jussiry
Created: 2012-01-11 19:39:59+00:00
State: open

I'm afraid it's too late to change this, but i think it's a big mistake. Namely, that each function for arrays gets `(value, key)` parameters, where as each function for objects gets `(key,value)` parameters.

If they would have the same order, this would not only save time of confused coders, but also lines of code, since in many cases you could use same helpers functions for both arrays and objects.

My solution would be to use `(value, key)` order in both cases, as it's done in underscore.js.