const array = ["one", "two", "three"] array.forEach(function (item, index) { console.log(item, index); }); Run code snippet