Question: I am trying to using some sort of namespace in JS.

I thought I might have something like:

```
var OuterObject = {
    var InnerObject = {
    settings: {
        numArticles: 5,
        articleList: $("#article-list"),
        moreButton: $("#more-button")
    },

    init: function() {
        s = this.settings;
        this.bindUIActions();
    },

    bindUIActions: function() {
        s.moreButton.on("click", function() {
            NewsWidget.getMoreArticles(s.numArticles);
        });
    },

    getMoreArticles: function(numToGet) {
        // $.ajax or something
        // using numToGet as param
    }
    };
};

```

How is it possible to do it?

Answer: 
Just like you would nest objects:

```
var OuterObject = {
    InnerObject: {
        settings: { ... }
        init: function() { ... }
    }
}

```
A couple of good articles on namespaces and nested namespaces.

<http://addyosmani.com/blog/essential-js-namespacing/>

<http://www.kenneth-truyers.net/2013/04/27/javascript-namespaces-and-modules/>