<% breadcrumbs.forEach(function(breadcrumb, index) { %> <% if (index > 0 && index < breadcrumbs.length) { %> <% } %> <% if (index === breadcrumbs.length-1) { %> <%=breadcrumb.title%> <% } else { %> <%=breadcrumb.title%> <% } %> <% }) %>