alias function

Hi
I learn to modify many base scripts from other plugin
but I don't understand them completely
one thing is what is the difference of alias.call(this)
sometime they call
Code:
my_alias = function_etc
function_etc{
my_alias.call(this)
code
code
code
}
and then sometime they call
Code:
my_alias = function_etc
function_etc{
code
code
code
my_alias.call(this)
}
What exactly is the difference?
Thank you
alias_variable = function_reference
creates a snapshot of the current state of your function. Calling that snapshot later is basically equivalent to pasting the lost code back into your function.

Thus the only difference between the two is the execution order. The first example would add additional code to the end of your previous function, the second example would add it to the beginning.

Code:
var example_function = function(param) {
    console.log(param);
};
example_function("Great");  // => Great

var alias1 = example_function;
example_function = function(param) {
    console.log("The param is: ");
    alias1.apply(this, param);
};
example_function("Great");  // => The param is: Great

var alias2 = example_function;
example_function = function(param) {
    alias2.apply(this, param);
    if (param === "Boring") {
        console.log(". And that is a shame...");
    } else {
        console.log(". Luckily it is not Boring...");
    }
};
example_function("Great");  // => The param is: Great. Luckily it is not Boring...

Edit: Too dumb to give a correct alias example on the first attempt... =)
thank you
I'm a bit confusing that your log show param = undefined
but I understand the concept now
thank you very much

Original thread: https://forums.rpgmakerweb.com/threads/alias-function.118708/