title: JavaScript: declare all members in constructor for documentary purposes?
body: <p>Should one declare and initialize all members of a class already in the constructor's function even if set to a meaningful value at a later point? And would you prefer <code>null</code> or <code>undefined</code>?</p>
  
  <pre><code>function MyClass() {
    /** @type {Number} [describtion] */  // first approach
    this._member1 = null;
  
    /** @type {Object} [describtion] */  // second approach
    this._member2 = undefined;
  }
  
  MyClass.prototype.work = function() {  // called later
    this._member1 = 42;
    this._member2 = { 'foo': 13 };
  
    /** @type {String} [describtion] */  // third approach
    this._member3 = "bar";
  };
  </code></pre>