var output = ''; $('.media-title').each(function( index ) { output = output + this.innerHTML + ', '; }); console.log(output); https://www.megadede.com/pelis/pending