//Opción 1: function findAverage(array) { if(array.length === 0) { return(0); } return array.reduce((a, b) => a + b, 0) / array.length; } //Opción 2: var find_average = (array) => { return array.length === 0 ? 0 : array.reduce((a, b)=> a + b, 0)/array.length }