Javascript Initialization Closure
<p>I'm trying to create javascript closure that will tell me if the function has already been run:  </p>

<p>This is what I have so far:</p>

<pre><code>function do()
{
   var isInitialized = function()
   {
     var init = false;

     if (init == false)
     {
       init = true;
       return false;
     }

     return init;
   }

   if (!isInitialized())
   {
     // do stuff
   }
}
</code></pre>

<p>My function isInitialized always evaluates to true.  I'm like 90% sure I'm not setting the internal variable correctly.  How do I fix my code?</p>
