<% _.each(favorites,function(favorite, index){ %> <% if (index != favorites.length - 1) { %> <% } %> <% }); %>