You can check whether it’s defined in the global scope using;
if (typeof window[strOfFunction] === "function") {
// celebrate
//window[strOfFunction](); //To call the function dynamically!
}
You can check whether it’s defined in the global scope using;
if (typeof window[strOfFunction] === "function") {
// celebrate
//window[strOfFunction](); //To call the function dynamically!
}