Issue with calling this.randomize function

In reply to cgales:

I think the question here is about behaviour of “this.randomize” of class A.
this.randomize of class A is randomizing the variable of class B.

From where you call “this.randomize” does not matter here as per my trials. Whether you call this.randomize from “new” or any other place it is still randomizing the variable of class B.