What is the difference between call and apply?
Asked 07 September, 2021
Viewed 3.1K times
  • 51
Votes

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?

25 Answer