```
 function  lookup ( inputString )
 {
     var responseArray = new Array();
     // alert(inputString);
     $.post("/airmanage/networkadmin/partnership_management/getMainDist.jsp",user: ""+inputString+""},
     function(data){
     // alert(data);
     responseArray = data.split(",");
     //alert(responseArray.length);
     });
     return responseArray;
     }

        var x   =   new  Array();
        x    =   lookup("a");
        alert (  x   );

```

I'm a newbie in jquery so can you guys help me out.
The responseArray comes empty when I place the alert.

I am not able to use the variable responseArray defined in js function to be assigned to a data in jquery function, please let me know how to use this variable.