MAD-PT-AngelMoya#44
Closed
mouyaq wants to merge 3 commits into
Closed
Conversation
ta-web-mad
reviewed
Oct 26, 2017
| for (var i = 0; i < palindrome.length; i++) { | ||
| switch(palindrome[i]) { | ||
| // Listado de caracteres que no tenemos en cuenta | ||
| case "\\": |
There was a problem hiding this comment.
Para este momento del curso esto vale, pero para más adelante investiga temas de expresiones regulares por ejemplo. Esta solución a largo plazo es poco mantenible.
ta-web-mad
reviewed
Oct 26, 2017
|
|
||
| //cuenta el número de palabras | ||
| var words = 0; | ||
| for (var i = 0; i < paragraph.length; i++) { |
There was a problem hiding this comment.
Aquí no estás contando palabras sino espacios en blanco (" "), deberías haber usado !== en lugar de ===.
Prueba siempre el código que escribes, para comprobar que hacer lo que quieres.
ta-web-mad
reviewed
Oct 26, 2017
| console.log("Words number = " + words); | ||
|
|
||
| // Cuenta el número de "et" | ||
| var numPattern = (paragraph.match(/( et | et\.| et,)/g)).length; |
There was a problem hiding this comment.
Este código no encuentra los "et" dentro de palabras. Revisa la expresión regular o usar los loops que hemos visto en teoría :)
|
Deberíamos usar comentarios descriptivos en nuestros commits, para que otros sepan que hace cada uno de ellos. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Week1 - Tuesday: Exercise 1 complete