¡GoConqr estrena diseño! Cuéntanos qué te parece.

Módulo 31 de 33 · Multimedia

Facebook vs Twitter

Kostas Diakogiannis

Facebook vs Twitter

FO-9 Facebook vs Twitter

Create a textarea so the user can type some things about the social media he uses everyday. 

Try to capture how many times the user has written the word 'facebook' and how many times the word 'twitter'. Create two counter variables for both and next to the textarea have 2 span elements, one for each saying:

FB: 5 Shares (assuming that the word 'facebook' was found 5 times in the text)

TW: 4 Tweets (assuming that the word 'twitter' was found 4 times in the text).

Ignore case sensitivity.

Bonus: Make this work even if the user types at some 'fb' (facebook counter gets one more in this case) or 'tw' (twitter counter increases).

At the end your result should look something like this:

Instrucciones

Para avanzar en el curso, envía un intento de este test. Puedes enviarlo después de la última pregunta.

Ir al módulo elegido

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?