countWords() Overview Counts the number of words in a given string. Code const countWords = (string) => string.split(" ").length;