In Javascript, is there a technique where I can execute code after a return?
<p>Is there a technique where I can execute code after a return?
I want to return a value then reset the value without introducing a temporary variable. </p>

<p>My current code is:</p>

<pre><code>var foo = (function(){
  var b;

  return {
    bar: function(a) {
        if(b){
          var temp = b;
          b = false;
          return temp;
        }else{
          b = a;
          return false;
        };
    }
  };
})();

foo.bar(1);
</code></pre>

<p>I want to avoid the <code>temp</code> var. Is that possible?</p>

<p><code>var b</code> holds a value between function calls because it is a memoization styled function.</p>
