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});
You can use forEach
method
myArray.forEach(function(el, index) { // el - current element, i - index});