JSFiddle - React, Tailwind, and code Playground
JavaScript
function runMe(thething) {
alert("the function has successfully run: " + thething);
}
// function we want to run
var fnstring = "runMe";
alert("string: " + fnstring);
// find object
var fn = window[fnstring]("lkjlksdfsdfj");
alert("function: " + fn);
// is object a function?
alert("is function?: " + typeof fn === "function");
fn();