User Profile
<%= blog.username %>
>

<%= blog.text %>

<%= blog.createdAt %>

<% blogImages = JSON.parse(blog.img) %> <% if (blogImages.length > 0) { %>
<% const iterations = (blogImages.length > 4)? 4 : blogImages.length %> <% for (let i = 0; i < iterations; i++) {%> <% if (blogImages.length > 4 && i == 3) { %>
+<%= blogImages.length - 4 %>
Image <%= i %>
<% } else { %> Image <%= i %> <% } %> <% } %>
<% } %>