Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@viveralia
Copy link

Tuvimos problemas para imprimir el mensaje cuando el nombre es el mismo y para imprimir los 'et' en el bonus. 馃槵

Copy link

@ta-web-mex ta-web-mex left a comment

Choose a reason for hiding this comment

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

Buen trabajo, llegaron a los bonuses! Recuerden buscar en MDN (or just Google it) lo que tengan duda antes de intentar solucionarlo, ahorra tiempo y esfuerzo. 馃尩

.join('')
)

for (let i = 0; i < hacker1.length; i++) {

Choose a reason for hiding this comment

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

Busquen en MDN el m茅todo localeCompare(). Cuando no sepan como analizar strings o arrays, primero b煤squen en Google. Pasa seguido que queremos hacer nosotros las comparaciones cuando hay m茅todos del lenguaje que facilitan esto mismo. Les ahorrar谩 mucho tiempo despu茅s :)

let etCounter = 0
let word = 'et'

for (let i = 0; i < text.length; i++) {

Choose a reason for hiding this comment

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

Same here. El m茅todo split() regresa un array que pone un nuevo elemento en el array cada que se repite un caracter, por lo que utilizar length sobre el array que regresa split y rest谩ndole uno (porque los arrays empiezan en 0) obtienes el numero de elementos en el string.
let et = text.split(',').length - 1
console.log(et)

@ta-web-mex ta-web-mex closed this Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.