title: JavaScript - String.newProperty vs. String.prototype.newProperty?
body: <p>In the code snippet at <a href="http://jsfiddle.net/javascriptenlightenment/QvbDw/" rel="nofollow">http://jsfiddle.net/javascriptenlightenment/QvbDw/</a>, the author augments the builtin String object constructor with 2 new properties - an array property and a function property.</p>
  
  <p>I notice that for the new array property, he did this:</p>
  
  <pre><code>String.newArrayProperty = [];
  // Q1: Why not String.prototype.newArrayProperty = []; ?
  </code></pre>
  
  <p>But for the new function property, he did this:</p>
  
  <pre><code>String.prototype.newFunctionProperty = function() {...};
  // Q2: Why not String.newFunctionProperty = function() {...}; ?
  </code></pre>
  
  <p>What's the difference between String.newProperty and String.prototype.newProperty?</p>