const myArray = ['hello', 1, 'thanks', 5]; myArray.forEach((item, index)=>{ console.log(index, item) })