jquery loop through array
snippet in javascript

jquery loop through array

user7826

var arr = ['one','two','three','four','five'];
$.each(arr, function(index, value){
	console.log('The value at arr[' + index + '] is: ' + value);
});

jquery loop over elements

user1124

$( "li" ).each(function( index ) {
  console.log( index + ": " + $( this ).text() );
});

jquery loop through li elements

user4009

//looping through list elements in jquery
$('#myUlID li').each(function() {
  console.log($(this));
})

jquery each

user1063

//Array
$.each( arr, function( index, value ){
    sum += value;
});

//Object
$.each( obj, function( key, value ) {
    sum += value;
});

jquery foreach

user7769

$.each( obj, function( key, value ) {
  alert( key + ": " + value );
});

jquery each array object

user1511

$.each(largeJSONobject.ReleatedDoc, function (index,value) {
    $('select.mrdDisplayBox').addOption(value.Id, value.Id + ' - ' + value.Number, false);
});