Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Looping through ejs data

<% articles.forEach((article)=> { %>
    <li>
        <h2>
          <%= article.title %>
        </h2>
        <p>
          <%= article.body %>
        </p>
    </li>
    <hr />
<% }) %>
 
PREVIOUS NEXT
Tagged: #Looping #ejs #data
ADD COMMENT
Topic
Name
4+2 =