Declaring:
var x = 0;
just creates a local variable in whatever function scope you're in.
That variable exists only for the lifetime of that function or function closure. This type of declaration NEVER binds this variable to an object as a property. To do that, you must explicitly assign a value to a property of the object as in this.x = 0;.
If you use a construct that causes the function closure to persist (which you have in your code), then the value of the local variable will exist in the function closure as a privately accessible variable, accessible only from that particular function in that particular context. It will behave in some ways like a private instance variable of your object. But, it is NOT a property of the object and you cannot reference it via this or any other reference to the object. You can only reference it from the function in which it is declared.
var x = 0does not assign the variable to the function. It merely happens to live inside it