[2020-01-11] Call a Dynamic Function with Dynamic Params
Useful for wrapper APIs or communicating with external interfaces: Note: This won't work in a strict mode.
function callFunction(fn, ...rest) {
this[fn].apply(this, rest)
}
callFunction('alert', 'Ping')
callFunction('setTimeout', () => alert('Timeout after 1s'), 1000)