$( "li" ).each(function( index ) { console.log( index + ": " + $( this ).text() ); });
$(querySelector).each(( index, value ) => { // do stuff });