call and apply javascript code example
Example 1: javascript function call with variable
function abc() {
alert('test');
}
var funcName = 'abc';
window[funcName]();
Example 2: js call and apply
func.call([thisArg[, arg1, arg2, ...argN]])
function abc() {
alert('test');
}
var funcName = 'abc';
window[funcName]();
func.call([thisArg[, arg1, arg2, ...argN]])