title: How to string concatenation inside of EJS for loop?
body: <p>Looping through some data creating list items and buttons. I need to pass the button the id the of the item but I am not sure how to string concat.</p>
  
  <pre><code>  &lt;% for(var i=0; i &lt; data.length; i++) {%&gt;
       &lt;li&gt;&lt;%= data[i].name + " " + data[i].species%&gt; &lt;button onclick="deleteAnimal(data[i]._id)" type="button"&gt; Delete &lt;/button&gt;&lt;/li&gt;
    &lt;% } %&gt;
  </code></pre>
  
  <p>How do I get the <code>deleteAnimal</code> function to interpret the actual id value?
  Right now the error I get is <code>data is not defined</code></p>