javascript - how to call a function using dynamic function name (parameterized) in nodeJS -


i able call function in code.. want make calling function name variable can call function based on variable value ..

reportpage.accounts()['cattype']() 

so here want make cattype variable, can pass value.. how declare/call here..

you replace string literal variable, anywhere else.

var thing = 'cattype'; reportpage.accounts()[thing]() 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -