JSFiddle - React, Tailwind, and code Playground

JavaScript

window.myfunc = function(){alert("test");};

myfunc();