Skip to content

[webptmad0418]Marta - #139

Closed
MartaSM wants to merge 1 commit into
ironhack-labs:masterfrom
MartaSM:master
Closed

[webptmad0418]Marta#139
MartaSM wants to merge 1 commit into
ironhack-labs:masterfrom
MartaSM:master

Conversation

@MartaSM

@MartaSM MartaSM commented May 1, 2018

Copy link
Copy Markdown

No description provided.

@ta-web-mad ta-web-mad left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dale un repaso a lo que te he ido comentando durante el ejercicio, sigue así! 👍

for (i=0; i<hacker1.length; i++){
charactersHacker1 += hacker1[i].toUpperCase();
charactersHacker1 += " ";
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puedes eliminar una línea si lo dejas de esta manera:
charactersHacker1 += hacker1[i].toUppercase + ' '
Igualmente, el resultado aparece con un espacio después del último carácter y no debe haber espacio tras éste. Cómo lo solucionarías?

for (i=hacker2.length-1; i>(-1); i--){
charactersHacker2 += hacker2[i].toUpperCase();
charactersHacker2 += " ";
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fíjate en el enunciado de los ejercicios y no copies lo mismo que hiciste antes. El resultado pide que sea en mayúsculas ni que haya espacios entre las letras. Solo que se muestre del revés.

}
console.log(charactersHacker2);

var comparation = hacker1.localeCompare(hacker2);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Es correcto, pero cómo lo harías sin la función localeCompare( )?

var leftToRight = "";
for (i=hacker3.length-1; i>(-1); i--){
leftToRight += hacker3[i].toLowerCase();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Te falta comprobar que en ambas strings solo haya caracteres que sean letras. En los dos últimos casos propuestos, por ejemplo, tienen '?' y comillas en medio. Y ambas son palíndromas. Cómo lo harías para comprobar que todos los caracteres son letras, y en el caso de que alguna no lo sea, quitarla para poder hacer la comparación?

}
}
wordsNumber += 1;
console.log("Lorem Ipsum lenght is: " + wordsNumber); No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Muy bien!, mira qué tal sale con las funciones split( ) y length( ). Te falta comprobar cuántas veces se repite 'et' en el texto, ánimo!

@stale

stale Bot commented Dec 17, 2019

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it didn't have any recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale label Dec 17, 2019
@stale

stale Bot commented Dec 19, 2019

Copy link
Copy Markdown

This pull request is closed. Thank you.

@stale stale Bot closed this Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants