How to get value from outside of the function in javascript?
<p>How can I get a var value from another function?</p>

<p><strong>jQuery</strong>:</p>

<pre><code>$(document).ready(function() {
    function GetBiggestValue() {
        var value = 0;
        $('#tagCloud li a').each(function() {
            if (value &lt; $(this).attr('value')) {
                value = $(this).attr('value');
            }
        });
        var FullValue = value;
    }

    function Abc(){
        console.log(FullValue);
    }

    Abc();
});
</code></pre>

<p><strong>HTML:</strong></p>

<pre class="lang-html prettyprint-override"><code>&lt;ul id="tagCloud"&gt;
    &lt;li&gt;&lt;a href="#" value="1"&gt;Val 1&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#" value="2"&gt;Val 2&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#" value="3"&gt;Val 3&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#" value="4"&gt;Val 4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
