How do i extrapolate function name in javascript? -


i have this

subject.books() 

that works great, @ 1 place in code have string 'books()', string want, want eval , evaluate function , give me same result above. how do it?

square bracket notation:

subject['somestring'](); 

https://developer.mozilla.org/en-us/docs/web/javascript/guide/working_with_objects


Comments