This example uses JavaScript to display a list where each list item is an element of an array. All content in is generated using JavaScript. For more information, see https://www.w3schools.com/js/js_arrays.asp and https://www.w3schools.com/js/js_loop_for.asp
for (element of array) {
// do something with element
}
for (var i = 0; i < array.length; i++) {
// do something with element array[i]
}