The value of _this
is just a copy of this
, so both will refer to the newly-created object. It's the object itself that's available.
In other words, one reference to an object is as good as another. In your code, there are three:
this
, inside the constructor_this
, also inside the constructorobj
, which is assigned a reference to the same object as a result of thenew
expression.
In newer JavaScript implementations, it's possible to make properties be hidden, but that hiding applies globally. JavaScript doesn't have anything like "class scope" that languages like C++ or Java do.