Counts the number of words in a string.
The input string
Number of words in the string.
countWords("js utils kit"); // 3countWords(" js utils kit"); // 3countWords(""); // 0 Copy
countWords("js utils kit"); // 3countWords(" js utils kit"); // 3countWords(""); // 0
Counts the number of words in a string.