Average calculator
Given an array of numbers, return and round the average to the nearest integer.
Sample Code:
function calcAvg(arr) {
// Enter your logic here...
}
Examples:
Input: [1,2,3,4,5,6]
Output: 4
Explanation: After rounding up, 4 is the average of all the numbers in the input array.
Input: [54.0,-20,3,2,1,0]
Output: 7
Explanation: After rounding up, 7 is the average of all the numbers in the input array.