, чтобы вызвать их действие JavaScript.
Пример вывода:
Код: Выделить всё
< /code>
var example = ['affirm', 'katapult'];
textSequence(0);
function textSequence(i) {
if (example.length > i) {
setTimeout(function() {
document.getElementById("container").innerHTML = example[i];
textSequence(++i);
}, 5000);
} else if (example.length === i) {
textSequence(0);
}
}< /code>
Подробнее здесь: https://stackoverflow.com/questions/795 ... p-function
Мобильная версия