I have a page that makes a foreach and show some photos like this
<% imgs.forEach(function(img) { %> /s
Something like this:
<% if(imgs.length > 0){ %> <% imgs.forEach(function(img) { %> <% }); %> <% } else{ %> no photos uploaded <% } %>
no photos uploaded
Reference