each Function

Executes the callback function passed as the second argument for every value contained in the object or array passed as the first argument. The function should expect 2 arguments: the value from the object or array, and the current iteration, which is a numeric value in the case of an array, or a property name in the case of an object. If "scope" is specified, the function will be executed with "this" referencing the specified "scope", otherwise "window" is assumed.




objObject|Array[required] Object or Array containing values.
fnFunction[required] Function to execute for each iteration.
scopeObjectScope the execute the function in.


nano.each(foo, function(val, i) { alert(i + ' = ' + val); });