Given the following variable:
Write some code to do the following:
- Write a function movingMean which takes two parameters, data and limit.
- This function should compute the mean value of the data array for the size limit.
- If the data array is larger than the size defined in the limit, you should delete items from the front of the array up until the array has only the no. of items defined by limit.
- Once that is done calculate the mean value of the array.
- Your function should return the mean value.
- To test your function, you should use array and ARRAY_LENGTH as the arguments for the 2 parameters.