title: How can I safely access other sibling functions and variables in a Javascript Module Pattern without accessing something in the containing scope?
body: <p>I have a Javascript Object structured after the Module Pattern.  I have several private function in it which are called from other sibling "private" functions.  How can I access another variable/function without the potential to accidentally access a global/external variable/object/function?</p>
  
  <pre><code>function doSomething() {
    alert("Something I don't want to do");
  }
  
  var My.Namespaced.SingletonClass = (function() {
    var init = function() {
      doSomething();
    }
  
    var doSomething = function() {
      alert("Something I want to do");
    }
  
    return {
      "init": init;
    }
  })();
  
  My.Namespaced.SingletonClass.init();
  </code></pre>
  
  <p>My guess is that the above code would in fact access the correct, inner <code>doSomething</code> function, but I'd like some more security than that.  How can I explicitly address the inner/nested function without fear of accidentally calling functions or addressing objects in the scope around my singleton?</p>