title: JavaScript returns function not value
body: <p>I have an object from which I call a function. Instead of the value it returns the function itself. This might be a duplicate but I could not find a proper solution. So any buzzword for this matter would be highly appreciated.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var w = window,
      d = document,
      e = d.documentElement,
      g = d.getElementsByTagName('body')[0];
  
  var asd = {
      getWindowWidth: function() {
          var x = w.innerWidth || e.clientWidth || g.clientWidth;
          return x;
      },
      getWindowHeight: function() {
          var x = (function() {
              return w.innerWidth || e.clientWidth || g.clientWidth;
          })();
          return x;
      },
      init: function() {
          console.log("init fired");
          console.log(this.getWindowWidth);
          console.log(this.getWindowHeight);
          console.log(typeof(this.getWindowHeight));
      }
  }
  
  asd.init();</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thank you in advance for your support.</p>