title: How to extend JavaScript literal (object) with a new variable?
body: <p>I have JavaScript variable as a literal:</p>
  
  <pre><code>var global = {
      getTime : function() {
          var currentDate = new Date();
          return currentDate.getTime();
      }
  };
  </code></pre>
  
  <p>And I wish to extend this literals with other different functions, which are going to be created as variables:</p>
  
  <pre><code>var doSomething = function(param){
      $("#" + param).hide();
      return "hidden";
  }
  </code></pre>
  
  <p><br />
  <strong>How can I extend my literal with a new variable, which holds a function?!</strong><br />At the end I wish to use this in such a way:</p>
  
  <pre><code>alert( global.doSomething("element_id") );
  </code></pre>