darkmavis1980
9/23/2014 - 10:32 AM

Example of the use of .each in jQuery

Example of the use of .each in jQuery

var $a = [1,2,3,4];
function parseNumber($data){
	$.each($data,function(index, value){
		console.log(index + ' ' +value);
	});
}
	
parseNumber($a);

/* It will print:
0 1
1 2
2 3
3 4
*/