JSFiddle - React, Tailwind, and code Playground
JavaScript
function funcOne() {
console.log('one');
}
function funcTwo() {
console.log('two');
}
function funcThree() {
console.log('three');
}
var i = 0;
var funcs = [ funcOne, funcTwo, funcThree ];
setInterval(function() {
funcs[i % funcs.length]();
i++;
}, 2000);