. JS , , , . , , (bla)() - , . , .
The practice of returning an object other than the created newone is what I sometimes see as a way to protect code that forgets newand simply calls the constructor. In this context, however, it makes no sense to assign properties this, since it thisis an object window. Otherwise, if you use new, the thisGC is immediately reset, so it still makes no sense.
source
share