collection | {Array/Object} | A collection of items to iterate over |
iteratee | {Function} | A function to be called once for each item that receives (value, key, collection) as arguments |
DollarJS (chainable)
$.utils.each(['foo', 'bar'], function(v, k){ console.log(v); })
$.utils.each({ abc: 123, def: 456 }, function(v, k){ console.log(v); })
Handles all types of collections gracefully (even undefined)