分配后访问类属性返回未定义

I have a problem accessing the class properties after I call the updateUIFromDatabase() function.

Console.log says "startUpCount: undefined".

Before that, everything seemed to work (database returns 123 as it should when I call pump1.getValueFromDatabase("startUpCount")).

有人可以发现我在做什么错吗?

class PumpBasic
{
    constructor(_name, _databaseTableName)
    {
        this.name = _name;
        this.databaseTableName = _databaseTableName;
        this.control = 0;
        this.statusOfPump = 0;
        this.feedback = 0;
        this.motorPTC = 0;
        this.dryRunProtection = 0;
        this.workingHours = 0;
        this.startUpCount = 0;
        this.errorCount = 0;
        this.feedbackTime = 0;
        this.safeToRestart = 0;
        this.unAckedError = 0;
        this.timeSchedules = [];
    }

    getValueFromDatabase(variableNameInDatabase)
    {
        $.ajax({
            url: "databaseValuesEnquiry.php",
            method: "GET",
            async: false,
            data:{getDatabaseVariableValue:1 ,"variableNameInDatabase":variableNameInDatabase,"databaseTableName":this.databaseTableName},
            success:function(response)
            {
                return response;
            }
        })
    }

    updateUIFromDatabase()
    {
        this.control = this.getValueFromDatabase("control");
        this.statusOfPump = this.getValueFromDatabase("statusOfPump");
        this.feedback = this.getValueFromDatabase("feedback");
        this.motorPTC = 0;
        this.dryRunProtection = 0;
        this.workingHours = 0;
        this.startUpCount = this.getValueFromDatabase("startUpCount");
        this.errorCount = 0;
        this.feedbackTime = 0;
        this.safeToRestart = 0;
        this.unAckedError = 0;
        this.timeSchedules = [];
    }

}

pump1 =new PumpBasic("pump1", "pump1settingstry");
pump1.getValueFromDatabase("workingHours");
pump1.updateUIFromDatabase();
console.log("startUpCount: ", pump1.startUpCount);