title: Best Practices for accessing private methods in the revealing module pattern
body: <p>Almost every revealing module pattern tutorial that I've seen will show a public method access a private method <strong>without</strong> using "method.<strong>call</strong>(this,...)".</p>
  
  <p>This seems to get the job done alright, but if you do a trace(this) in the private method, it will show "Window". This feels like a potential gotcha.</p>
  
  <p>Should I be using <code>call</code> (or <code>apply</code>), or would this be introducing unneeded complexity?</p>
  
  <p>plunk: <a href="https://plnkr.co/edit/hc3ZPJyeHcT9bLbLaLpX?p=preview" rel="nofollow noreferrer">https://plnkr.co/edit/hc3ZPJyeHcT9bLbLaLpX?p=preview</a></p>
  
  <p>EDIT: My thinking is that by using "call", it somehow makes it "safer" since the context is the api object rather than the global namespace. </p>
  
  <pre><code>var Module = (function () {
  
      var _privateVar = "PRIVATE!";
  
      var api = {
          publicMethod: publicMethod
      }
  
      return api;
  
      function publicMethod() {
          privateMethod();
          privateMethod.call(this);
      };
  
      function privateMethod(message) {
          console.log(_privateVar, this);
      };
  
  
  })();
  
  Module.publicMethod();
  </code></pre>