Can I dynamically call a static function with name as a string? After some try it's all i can get :
class Test{
static Instance(){
console.log( "Instantiated" );
};
};
Test.Instance();//<-- ok
var testVar = "Test";
eval( testVar + ".Instance()" ); // ok but eval is evil!
window[testVar].Instance();//<-- undefined is not an object (evaluating 'window[testVar].Instance')