2
I can’t pass the variable x that is in return for another function.
I declared the global variable, but it still doesn’t work.
function pegaid() {
    var x = "";
    _agile.get_contact("[email protected]", {
       success: function (data) {
          var x= data.id;
          alert(x);
       },
       error: function (data) {
          console.log("error");
       }
    });
    alert(x);
};