What about
var obj={}; obj.test1=function(a){console.log("test1 called"+a);}; function jstest(funname,argument) { if (obj[funname] !== undefined) { //or if (typeof obj[funname] === 'function') ?? obj[funname](argument); } } jstest("test1", "test");
Not tested.
@alexanderbrevig started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
What about
Not tested.