Прежде всего это может быть массив функций:
// the list of functions
const actionList = [];
// pushing functions to the list
actionList.push(func1);
actionList.push(func2);
...
// running functions in a loop
for(let i = 0; i < actionList.length; i++) {
actionList[i]();
}
Если вы хотите запустить их последовательно с некоторой задержкой, вы можете использовать простейший подход с рекурсивным таймером:
const run = function (actionList, index, delay) {
setTimeout(function () {
actionList[index](); // execute current index function immediately
index++; // increment index...
if(actionList[index]) { // ...while there are items in the list
run(actionList, index, delay); // next index function will be executed after "delay" ms
}
}, delay);
}
run(actionList, 0, 1000);