use string to call function name code example
Example: js call function by string name
function test() {
console.log('Executed function "test".');
}
window['test']();
function test() {
console.log('Executed function "test".');
}
window['test']();