- Notifications
You must be signed in to change notification settings - Fork6.7k
[MAD][WEB-PT0418][EDNA-DOMINGOS]#368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Removed duplicated text
Extra Resources added
…with-teststarter-code-with-tests
…one" but the test is expecting for the string itself, i change the Readme file wich is the quck fix, but may be could be good to change the spec file to not confuse the student.
…tion-fixthe test are waiting for undefined but the description says false
…rd-fixfind-longest-word-little-fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Lo que has hecho lo has hecho muy bien Edna, no decaigas y sigue así. Ánimo!
else { | ||
return num2; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Muy bien, así es, mírate también la documentación del la función Math.max( ) y prueba a ponerlo en práctica con este ejercicio
return longestWord; | ||
} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Muy bien!
} | ||
return sum; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Genial, mira también cómo hacerlo con la función reduce( ), que es súper útil para estos casos
var average = sum /numbersTwo.length; | ||
return average; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Muy bien Edna, además has reutilizado una función que declaraste antes, genial!
wordLLength[i] | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
El proceso para este ejercicio es:
1 - Iterar sobre el array que recibe la función
2- Por cada vuelta almacenar en una variable sumatorio (o acumulador) la longitud de cada elemento del array
3- Cuando acabe el bucle, haces la media de ese acumulador con el número de elementos del array que recibes (como en el ejercicio anterior)
Recuerda, dividir en microproblemas te ayudará a resolver más facilmente el problema general, ánimo!
Se que era un ejercicio por parejas , pero mi compañero ya lo subio y no me entere de nada , asi que prefiero subir esta realemente lo que yo entiendo.(Por el momento )