Inside Express/EJS templates, what is cleanest way to loop through an array? Inside Express/EJS templates, what is cleanest way to loop through an array? express express

Inside Express/EJS templates, what is cleanest way to loop through an array?


You can use forEach method

myArray.forEach(function(el, index) {    // el - current element, i - index});