I always wanted to learn NodeJS to be able to run the same code on server and client side. I am using NodeJS with Express and EJS. So. I have a .ejs page with lot\'s of HTM
As per ejs templates documentation
var template = new EJS({ text: ` <% for(i = 0; i < the_list.length; i++) { %> the_list[i] <% } %> ` }); var html = template.render({ the_list: data }); document.getElementById('list-wrapper').innerHTML = html;