JAvascript practice

So far was able to create word count function