Javascript - compare text in multiple text areas for same words
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

I need to compare two+ text strings and find words that are common between them. This bounty is to make a UI page that has text areas on it, with ability to add more. we will put in each of the text areas some text and then scan all of them to find which words are in common between the n+1 text areas. We will have a reasonable limit of 10 text areas to process if it matters. if it can be unbounded then great.

its fine to assume chrome only here if needed

if not too much trouble please post working code in repl.it

Tags
javascript

Crowdsource coding tasks.

2 Solutions


Hi

please test this solution. It will find the common words between two textareas and display it into a third one.

If you need more textareas, you will just use the same intersect function between the result textarea and the other textareas. All depend on how you will make your comparison (intersect or union).

EDIT : I have added the function to add textareas and make difference between them. It will only return the data that are in all textareas

Best regards

Winning solution

Solution

Hello Qdev,

The web app you were looking for can be found here.

Let me know if you need anything more.

Thanks,
Vladimir

It expects words to be separated by a space, but you can customize this, of course. (or ask me to do it :)
VladimirMikulic 4 months ago
Just what I was looking for too. Thanks, Vladimir!
marina 22 days ago
No problem!
VladimirMikulic 22 days ago
View Timeline