I saw an example dealing with parent class and daughter class where, at the beginning of the specialized class, it looked like this:
var ClasseFilha = function ClasseFilha (){
ClassePai.apply(this, arguments);
...
};
Although understand how apply
works and see how the child class modifies itself in the second row (using this before and after apply
brings different results), I get confused as ClassePai.apply(
) modify ClasseFilha
without a direct assignment on a variable, for example.
I would like a more theoretical explanation for this, if possible.