Functions Assignment (industry): The function section has been added. An anonymous function is used to calculate the average of monthly earnings from the past 3 months of the data that was stored in the monthlyEarnings array. It returns an average value.