calling function from function object javascript

JavaScript
var runApp = {

    init: function(){   
         this.run()
    },

    run: function() { 
             alert("It's running!");
    }
};

runApp.init();
Source

Also in JavaScript: