Write a function countWords(sentence) that counts how many times every word occurs.
Map: the key is the word in lower case, the value is the count.Test and test are the same word.Map.countWords('the cat and the hat')Returns Map(4) { 'the' => 2, 'cat' => 1, 'and' => 1, 'hat' => 1 }
countWords('Test, test!')Returns Map(1) { 'test' => 2 }
countWords('the cat and the hat')Map(4) { 'the' => 2, 'cat' => 1, 'and' => 1, 'hat' => 1 }countWords('Test test TEST')Map(1) { 'test' => 3 }countWords('')Map(0) {}Hidden tests run on Submit.