I'm trying to do a CRUD and its already insert values but when it comes to list that values, dont get the values, for this code I'm using ejs and html
<% if(data) { %>
<% for (var i =0; i < data.length; i++ ) { %>
<tr>
<th><%= i+1 %></th>
<th><%= data[i].name %></th>
</tr>
<% } %>
<% } %>
**But when I put a number (0 or 1) instead of i it capture the right value **
<th><%= data[0].name %></th>