.forEach( array, handler_function )
Iterates over the array elements and pass the element as input parameter to the handler function. If the handler function returns a value, that will overwrite the initial value and will be returned as new Array.
Parameters
NameTypePossibleDescription
arrayArrayArray variableAn array of values
handler_functionfunctionHandler function which takes array value as input and returned value will be used overwrite source array's initial value
Returns
TypeDescription
ArrayReturns the new Array with new or existing values
Example 1
JS
		$.domLoaded(function() {

			var arr = [1,2,3,4];
			
			// Handler function add 5 to each element and returns
			var newArr = $.Util.forEach( arr , function(el) {
				return el + 5;
			});
			
			console.log(newArr); // will print [6,7,8,9]
			
		});						
						
Example 2
JS
		$.domLoaded(function() {

			var names = [  {name : "Senthil", age : "26"} , 
			               {name : "Ganesh", age : "29" },
						   {name : "Shane", age : "26" }];
			
			console.log(" Name   |  Age  ");
			
			// Handler function prints the names and age
			$.Util.forEach( names , function(el) {
				console.log(el.name + " | " + el.age);
			});
			
		});						
						
Result
 Name   |  Age  
Senthil |  26	
Ganesh  |  29	
Shane   |  26