Javascript nested fucntions
<p>I am using nested functions </p>

<pre><code>Function mainfunction (callbackfun) {
    //some code + function (score)
    {
        var score = scoreString;
        alert(scoreString);
        callbackFun(score);
    }
}  //--&gt; i return this value to my calling function

mainfunction(function (anystring){
    alert(anystring);  //-&gt; this would return me the value in callbackfun 
}); 
</code></pre>

<p>What I want is access that value in <code>anystring</code> out like</p>

<pre><code>var fetchvalue ;

mainfunction(function (anystring){
    fetchvalue =anystring;  //-&gt; this would return me the value in callbackfun 
}); 
</code></pre>

<p>Please guide me if am on the right track .</p>
