typescript can infer it too:
function main() {
let words = [];
for (const word of [...words, 'Hello']) {
console.log(word);
}
}