let fruits = ["Banana", "Orange", "Apple", "Mango"] var f = fruits.entries(); for (let [index,elem] of f) { console.log(index) console.log(elem) }