javascript counting letters in a word code example
Example 1: javascript count words in string
var str = "your long string with many words.";
var wordCount = str.match(/(\w+)/g).length;
alert(wordCount); //6
// \w+ between one and unlimited word characters
// /g greedy - don't stop after the first match
Example 2: how get count of letters in javascript
//when use length for string this will be return the count of charactor
//in string
$("#about_me_textarea").val().length