Having the function name 'foo' and its argument 'arg' in strings, is there a way to execute foo(arg)? Do I need to use eval? I want to do something like send(foo, arg) if it were in Ruby.
I agree on window[name] but arg was also a string. window[name](window[arg]); feels as not what you always want. this[name](this[arg]); might work but not for local vars.