title: Singleton Pattern in Javascript
body: <p>I'm reading <em>Javascript Patterns</em> recently.And I don't understand the code below when it talks about singleton pattern:</p>
  
  <pre><code>function Universe(){
      var instance;
      Universe=function Universe(){
          return instance;
      };
      Universe.prototype=this;
  
      //the new Universe below,refers to which one?The original one,
      //or the one:function(){return this;} ??
      instance=new Universe();
  
      instance.constructor=Universe;
  
      instance.bang="Big";
  
      return instance;
  }
  Universe.prototype.nothing=true;
  var uni=new Universe();
  Universe.prototype.everything=true;
  var uni2=new Universe();
  
  uni===uni2;//true
  </code></pre>