JSFiddle - React, Tailwind, and code Playground

JavaScript

function func1(){
    document.write(1);
};
function func2(){
setTimeout(function() { document.write(2) }, 1000);
}
function func3(){
    document.write(3);
};
function QueueRun(queue){
    for (var i=0; i<queue.length; i++){
        queue[i]();
    };
};

var queue= new Array(func1, func2, func3);
//QueueRun(queue);
func1(); func2(); func3();