JSFiddle - React, Tailwind, and code Playground

JavaScript

(function(){
        function test(){alert("foo")};
        function test2(){alert("bar")};
        
        // will fail (have a look at the console!)
        setTimeout("test()",1000);

        // will work
        setTimeout(test2,1000);

    })();