Javascript pass variable by reference
<p>How can I pass variables by reference to setInetrav's call back function?<br>
I don't want to define global variable just for the counter, is it possible?</p>

<pre><code>    var intervalID;

    function Test(){
        var value = 50;               
        intervalID = setInterval(function(){Inc(value);}, 1000);              
    }

    function Inc(value){
        if (value &gt; 100) 
            clearInterval(intervalID);
        value = value + 10;                                       
    }

    Test();
</code></pre>
