Course · Section 9: Data Structures, Modern Operators and Strings · Lecture 128: Working With Strings - Part 1
Implement `wordCount(s)` returning the number of words in `s`, where words are separated by any whitespace and surrounding whitespace is ignored.
+ 1 hidden test run on Submit.
Trimming and splitting on \s+ with a filter handles extra and leading/trailing whitespace correctly.
Run your code to see results.