title: extend scope of inner var into another function
body: <p>I'm sure you've gone through this a lot of times, but I cannot figure out a thread witch really fits for my needs.</p>
  
  <p>How can I get var inner to work in outertwo? </p>
  
  <pre><code>function outerOne(){
  
  /* do something*/
  
      var inner = function(){
              return true 
      }; inner();
  
  };
  outerOne()
  
  
  function outerTwo(){
      if (inner==true)
  /* do something*/
  };
  outerTwo();
  </code></pre>
  
  <p>please note, I know it would be possible to declare var x outside to make it global.
  but what I like to achieve is to get the var out of the scope from inside the function</p>