Yes. In current versions of JS you can use:
app[func]( ...args );
Users of ES5 and older will need to use the .apply()
method:
app[func].apply( this, args );
Read up on these methods at MDN:
- .apply()
- spread “…” operator (not to be confused with the related rest “…” parameters operator: it’s good to read up on both!)