are functions in functions not allowed in widgets? What's happening here?

are functions in functions not allowed in widgets? What's happening here?

In an Autocomplete select: option function, I define a variable as a function.  The variable does not execute this function. It completely skips it.  I get no error in the Console, but when I follow execution line by line. I get the following at that line, which I don't understand.

  1. citiesWithBoroughs: function (request, response){
    1. get arguments: function ThrowTypeError() { [native code] }
    2. get caller: function ThrowTypeError() { [native code] }
    3. length: 2
    4. name: ""
    5. prototype: Object
    6. set arguments: function ThrowTypeError() { [native code] }
    7. set caller: function ThrowTypeError() { [native code] }
    8. __proto__: function Empty() {}
    9. <function scope>
The select: option looks like this.

select: function (event, ui){
    $(this).val(ui.item.value);
    $("#hiddenState").val(ui.item.abbrev);
    citiesWithBoroughs = function (request, response){
            alert("|" + $("#hiddenState").val() + "|cWB"); //does not fire
            $.ajax({
                  url: "getCitiesWithBoroughs.php",
                  data: {
                        stateProvinceAbbreviation: $("#hiddenState").val(),
                        countryAbbreviation: $('input[name=country]:checked').val() },
                  type: "POST",
                  dataType: "text",
                  success: function (data){
                        response(data);
                        alert(data); //does not fire
            });
      }
      citiesWithBoroughs();
}


The variable is declared outside the Autocomplete widget.
var citiesWithBoroughs = [];

I have tried 2 sequential functions in the select: option, and the page does not load. Why does the variable throw those errors at run time, and what do they mean?

Thanks for any insight you have about this.