What is the difference between call and apply?
What is the difference between using call
and apply
to invoke a function?
var func = function() {
alert('hello!');
};
func.apply();
vs func.call();
Are there performance differences between the two aforementioned methods? When is it best to use call
over apply
and vice versa?