const data = [1, 2, 3]; let iterations = data.length; for (item of data) { if (!--iterations) console.log(item + " => This is the last iteration..."); else console.log(item); }