The core idea is to create wrapper functions on the this object which automatically intercept the calls to the functions defined on the prototype object. The automatically generated interception functions combine the this and the private data, make a call to the prototype function, then uncombine the data back into the this and the private data.

The private property, nickname, is not accessible outside the object. It is accessed via the this pointer but it does not actually reside on the object. The private property actually exists as a local variable in the createPrivateThis() function that is accessed via closure (only available inside the function).