const list = Array.from({ length: 1000 }, (_, i) => i) let total = 0
for (const value of list) { total += value }
list.forEach(value => { total += value })