arguments object. It was called
apply in that article I hadn’t talked about the difference.
Well it’s actually quite simple. First of all, both methods expect a
this inside the function that is called or applied. The single difference is that the
call method requires that arguments are specified separately; the
apply method takes them as an array. It’s clearer if you see the syntax:
function.call(thisArg[, argument1[, argument2[, ...]]]);
So if you’re working with the
arguments object as the array argument.
Hope that’s useful to you!
Feature image by Sudhamshu. Can you work out the significance?
iOS Developer, sometimes web developer and Technical Editor.
Jump Start Git, 2nd Edition
Visual Studio Code: End-to-End Editing and Debugging Tools for Web Developers
Form Design Patterns