javascript - Create a method from a string in JS -


so have string "getnumber":

i use string method object: myobj.getnumber()

is possible? thanks

as simple as:

myobj['getnumber'](); 

Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -