GoConqr has a new look! Let us know what you think.

Module 31 of 33 · Media

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:

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?