How to Store The $.ajax Response in Some Variable Please Help me ......

How to Store The $.ajax Response in Some Variable Please Help me ......

Hi guys 
Please Help me I am facing problem that how to get the result of the Ajax Response in some variable 

i am using the following code

AjaxGet = function (url) {
    var result;
    $.ajax({
        type: "POST",
        url: url,
        param: '{}',
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function (data) { result = data; }
    });
    return  result;
}

Now from above code i want to store the result in some varialbe like below,

PM = {};
var output;
PM.projects = function () {
var data =     AjaxGet('admin/DataService.asmx/HelloWorld');
alert(data);
    
}