title: Why this javascript class returns undefined
body: <p>I have this simple Javascript code to write some modules, but I don't know why I get undefined results even when I'm calling the function from inside:</p>
  
  <pre><code>window.onload = function () {
      function testFunction() {
          this.hours = null;
          function getHours() {
              return this.hours;
          }
  
          alert(getHours());
          return {
              getHours: function () {
                  return getHours();
              }
          }
      }
  
      var test = new testFunction();
      alert(test.getHours());
  
  }
  </code></pre>
  
  <p>I think I've problem in understanding <code>THIS</code> keyword in javascript and using it inside javascript constructors.</p>
  
  <p>Thank you.</p>