const it = cycle(['A', 'B', 'C', 'D', 'E'])
let timer1;
function* cycle(arr) {
let i = 0;
while (i < arr.length) yield arr[i++]
}
(function timer() {
timer1 = setTimeout(function () {
const cur = it.next();
if (cur.done) {
clearTimeout(timer1);
} else {
console.log(cur.value);
timer();
}
}, 1000);
}());
Вариант с генераторами
https://learn.javascript.ru/generator