Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

count words in a string

function WordCount(str) { 
  return str.split(" ").length;
}

console.log(WordCount("hello world"));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #count #words #string
ADD COMMENT
Topic
Name
3+1 =