GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Modul 31 von 33 · Medien

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:

Anleitung

Um im Kurs weiterzukommen, sende einen Versuch dieses Quiz ab. Du kannst ihn nach der letzten Frage absenden.

Zum gewählten Modul

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck