let arr = [1, 2, 3, 4, 5]; for (const [i, element] of arr.entries()) { if (element % 2 == 0) { console.log(`The ${element} is even and the position is ${i}`); } }
let arr = [1, 2, 3, 4, 5]; for (const [i, element] of arr.entries()) { if (element % 2 == 0) { console.log(`The ${element} is even and the position is ${i}`); } }