Consider a use case:
// library method, I can\'t edit it. Its calling my custom methods function dynamicMethod(action, params) { .... call1[action](params