return every index of an array javascript code example Example: how to get every index of array in javascript for(const element of array) console.log(element)