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 -

javascript - How to bind ViewModel Store to View? -

javascript - Solution fails to pass one test with large inputs? -