If I have my name space for my app like so:

```
var myApp = {};

(function() {
    var id = 0;
    this.next = function() {
        return id++;  
    };
}).apply(myApp);

```

Then if I log the following result:

```
console.log(myApp.next()); //1

```

How can I store variable within the name space function, for instance something like:

```
var myApp = {};

(function() {
    var id = 0;
    this.next = function() {
        return id++;  
    };

    // Store variables here ...
    this.variableStore = function() {
            var var1 = "One";
    };
}).apply(myApp);

```

Trying to access like this:

```
console.log(myApp.variableStore().var1); // Gives me an error

```

Is this possible, or even a good idea? Or should I just declare a new name space for what are essentially global variables?