title: Class vs. static method in JavaScript
body: <p>I know this will work:</p>
  
  <pre><code>function Foo() {};
  Foo.prototype.talk = function () {
      alert('hello~\n');
  };
  
  var a = new Foo;
  a.talk(); // 'hello~\n'
  </code></pre>
  
  <p>But if I want to call</p>
  
  <pre><code>Foo.talk() // this will not work
  Foo.prototype.talk() // this works correctly
  </code></pre>
  
  <p>I find some methods to make <code>Foo.talk</code> work, </p>
  
  <ol>
  <li><code>Foo.__proto__ = Foo.prototype</code></li>
  <li><code>Foo.talk = Foo.prototype.talk</code></li>
  </ol>
  
  <p>Are there other ways to do this? I don’t know whether it is right to do so. Do you use class methods or static methods in your JavaScript code?</p>