JSFiddle - React, Tailwind, and code Playground

JavaScript

function main(statement, callback) {
    $("body").append("Statement: " + statement + "\n");
    callback();    
}

function anyFunction() {
        $("body").append("<p>I'm writing to a wall</p>");
}

main("This is test 1",anyFunction);
     
     
function main2(statement, callback) {
    $("body").append("Statement: " + statement);
    anyFunction2();    
}

function anyFunction2() {
        $("body").append("<p>I'm writing to a wall Again</p>");
}

main2("This is test 2");