JSFiddle - React, Tailwind, and code Playground

by James

JavaScript

//Create string representation of function
var s = "function test(){  alert(1); }";

//"Register" the function
eval(s);

//Call the function
test();