Possible to scope a javascript variable to a function and that function's recursive calls to itself?
I am in a situation where I have a loop that is calling a function.  The function will make recursive calls to itself once called.

Is there a way that I can scope a variable to the function and the chain of recursive calls generated from the first call?

Something like this:

    while(var i=0;i<100;i++)
    {
      myFunction();
    }

    function myFunction()
    {
       var someNumber = 200;
       someNumber -= 10;
       if( someNumber > 0)
       {
          myFunction();
       }
    }

where at the second iteration of the first call to someNumber would be 190 and not 200.  Is this possible to accomplish?

If there is anything confusing here, please let me know.

Possible to scope a javascript variable to a function and that function's recursive calls to itself?
===

I am in a situation where I have a loop that is calling a function.  The function will make recursive calls to itself once called.

Is there a way that I can scope a variable to the function and the chain of recursive calls generated from the first call?

Something like this:

    while(var i=0;i<100;i++)
    {
      myFunction();
    }

    function myFunction()
    {
       var someNumber = 200;
       someNumber -= 10;
       if( someNumber > 0)
       {
          myFunction();
       }
    }

where at the second iteration of the first call to someNumber would be 190 and not 200.  Is this possible to accomplish?

If there is anything confusing here, please let me know.
