jQuery cannot preserve data after .ajax() call
===

I am trying to do a simple call where I get data back from $.ajax() and would like to save it into a global variable which I can use in a function that called the ajax call. 

Why is the variable not being set? Why is the value that I set gets lost?

    <script type="text/javascript">
    
    
        jQuery.support.cors = true;
       
    
       
        $.myNamespace = {
            timerID: "in namespace"
        };
    
        $(document).ready(function () {
    
    
            $("#btnSkip").click(function () {
    
    			alert($.myNamespace.timerID);
    
                startCall();
    
            });
    
    
            function startCall() {
    
                $. myNamespace.timerID = "in startCall()";
                alert($.myNamespace.timerID);
    
                finishCall();
    
                alert($.myNamespace.timerID);
    
            }
    
            function finishCall() {
    
    
                $.myNamespace.timerID = "in finishCall()";
                alert($.myNamespace.timerID);
    
                
                $.ajax({
                    type: "GET",
                    url: getUrl,
                    processData: false,
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (data) {
    
                        GetSongInfoSucceeded(data);
    
                    },
                    error: function (xhr, status, error) {
                        GetSongInfoFailed(xhr, status, error);
                    }
                });  
    
    
            } 
    
    
            function GetSongInfoFailed(xhr, status, error) {
                alert('Service call failed: ' + xhr + ' ' + status + ' ' + error);
            }
    
            function GetSongInfoSucceeded(C) {
                if (result != null) {
    
                    $.myNamespace.timerID = "in ajax succeeded call";
                    alert($.myNamespace.timerID);
    
                } else { }
    
    
            }
    
    
        });
    
    </script>


    OUTPUUT IN ALERTS:
    "in namespace"
    "in startCall()"
    "in finishCall()"
    "in ajax succeeded call"
    "in finishCall()"


why is the last value of variable is set to "in finishCall()" instead of "in ajax succeeded call"? 

** Note, I am not a jQuery or javascript expert. 

Thank you so much!