jQuery ajax data usability
<p>Why doesn't this work?</p>

<pre><code>var myData;

function getData()
{
    $.ajax(
        { 
            url: dataURL, 
            success: function(data)
            {
                myData = data;
            }
        }
    );
}

getData();
console.log(myData);
</code></pre>

<p>I'm scoping the variable correctly, but I can't use the data outside the function..</p>
