Let's Talk About Aliases

@Clock Out the difference between call and apply; when performing a call, you must supply all expected arguments with that call, but if you apply rather than call, then you do not need to supply any actual arguments and the code will just apply whatever may have been passed by default?

your post was very helpful.
Sort of!

The arguments object is an array-like object each function receives when it's invoked. It holds the values passed to a function even when then function wasn't defined with a formal parameter list. The code was passing the arguments object to apply() which takes an array or array-like object for its 2nd argument.

Say we have a sum() function that defines a and b as parameters and returns their sum. It's possible to invoke the function using apply() and pass in an array. The apply() method then calls sum() and passes in the arguments as if we had called the function normally.

Spoiler: Source
Code:
function sum(a, b) {
    return a + b;
}

var args = [2, 3];

sum.apply(undefined, args); //=> 5
i think i understand; if i were to use call, then i have to explicitly pass the arguments as they are expected, like this:
Code:
Object.method = function(arg1, arg2, arg3) {
    //code;
};

Object.anotherMethod = function() {
    Object.method.call(this, arg1, arg2, arg3);
    //code
};

whereas using apply would allow me to pass an array that meets that criteria, like this:
Code:
Object.method = function(arg1, arg2, arg3) {
    //code
}

Object.anotherMethod = function() {
    var args = [arg1, arg2, arg3];
    Object.method.apply(this, args);
    //code
};

Original thread: https://forums.rpgmakerweb.com/threads/lets-talk-about-aliases.86475/