Why call "call" when calling alias methods

I've just been doing this blindly since the example plugins do it this way, but when they do aliasing, they invoke the aliased method like this:

MyAliasedMethod.call(this, arg1, arg2, ... );Is there some reason why they chose to do this?Why not just invoke the method normally like

Code:
MyAliasedMethod(arg1, arg2, ...)
Whatever you pass as the first parameter is going to be the value of the "this" variable inside that method. If you don't use .call, the "this" may be refering to something different than you'd expect it to.
Basically, let's say you were to do something in Game_Action but you wanted to call a function you've aliased for Game_Battler.

Inside of Game_Action, instead of doing aliasedBattlerFunction.call(this, args), you'd be doing aliasedBattlerFunction.call(battler, args) so that the code knows what you're trying to do.
You can also 'apply' the function onto an object, and you pass the parameters as an array of arguments.. Example:

MyAliasedMethod.apply(this, [arg1, arg2, ...] );This is helpful because you may not know what other possible parameters are passed to the function, but you know the first one, and thats the one you want to use.. So you could do something like this...

Code:
(function(someClass){  var someFunction = someClass.someFunction;  someClass.someFunction = function(knownParameter){    if (knownParameter !== undefined){      // Do some code with knownParameter       // ...    } else {      // Call aliased function - pass ALL parameters      // send to this method via the default 'arguments' variable.       someFunction.apply(this, arguments);    }  };})(someClass);
As @Hudell says it has to do with the special `this` value, when `aliasing` you're just giving a name to a reference to a function, that function may use `this` inside,

when called what `this` actually points to depend of the context of which that function is called:

if the function is permabinded using `Function#bind` `this` will always refer to the first argument of the bind call.

if the function is called using Function#call or Function#apply the `this` will refer to the first argument of either call or apply

if the function is called as a member expression `this` will refer to the thing at the left of the `.` or `[]` operator

otherwise it will refer to the global object... unless you're in strict mode where will be `undefined`.

more info at:

http://dmitrysoshnikov.com/ecmascript/javascript-the-core/#this-value
you call "call" because if you look at a basic ES6 version, which simulates modern languages:

class Something { constructor(){ .. } methodName() { ... }}class SomethingElse extends Something { constructor() { super() } methodName() { super(this) }}// Its the same as calling "call"If you know Java or other languages that use "modern syntax like the above" you'll under that we are calling the parent method (think ruby), the reason we pass this is because this is scoped differently then other variables in Javascript. So we pass an instance of this to the parent class so we don't break anything

Original thread: https://forums.rpgmakerweb.com/threads/why-call-call-when-calling-alias-methods.49632/