Currently, I can count characters with this:
Code: Select all
myText = text.sourceText;
myText.length
Is this possible?
Thanks in advance!

Moderator: Paul Tuersley
Code: Select all
myText = text.sourceText;
myText.length
Code: Select all
function getNumWords( string ) {
// Split the string where there is spaces, then count the array length
return string.split( ' ' ).length
}