The reasons you are using
are one or two of the following:
- You already have arguments that will be passed to the function as an array or an array-like object;
- You want to
bind in a certain way when you call the function.
If you have a list of values in an array for some reason and you know those values are exactly what you need to pass to the function, what else would you do? Something like:
if (array.length == 1) theFunction(array); else if (array.length == 2) theFunction(array, array); else ...
If you know you want to
be tied to some object, you can always make the function a temporary property of the object and call the function through the object, but that's also pretty awful. If all you have to do is bind
and the arguments are not in the array, well, your alternative is to use
source to share