const items = ['Apple', 'Pear', 'Orange']
for index
for (var i=0; i<items.length; i++) { console.log(items[i])}
forEach
items.forEach(item => { console.log(item)})
with index
items.forEach((item, index) => { console.log(item, index)})
for ... of
for (const item of items) { console.log(item)}
with index
for (const [index, item] of items.entries()) { console.log(item, index)}
NOTE: Don't use for ... in
as it is used to iterate object/dict.