title: What is the difference between these two code samples?
body: <p>Code 1:</p>
  
  <pre><code>var Something = {
  name: "Name",
    sayHi: function(){
       alert(Something.name);
    }
  }
  </code></pre>
  
  <p>Code 2:</p>
  
  <pre><code> function Something(){
      this.name = "Name";
   }
  
   Something.prototype.sayHi = function(){
      alert(Something.name);
   }
  </code></pre>
  
  <p><strong>Edit:</strong>
  So, Guys, you mean the Second one is better? or more "formal" ?</p>