code:
<% newitems.forEach(function(item){%>
<div class="item">
<input type="checkbox" />
<p>
<%= item.name %>
</p>
</div>
<% });%>
by using for loop i got the required output when i tried to use for each loop i got error
code used for for loop
<%for(var i=0; i<newitems.length; i++){%>
<div class="item">
<input type="checkbox" >
<p><%= newitems[i].name %></p></div>
<%}%>