function each(collection, callback, scope) { var key; for (key in collection) { if (collection.hasOwnProperty(key) { callback.call(scope, collection[key], key, collection); } } }