angular string character length code example
Example 1: how to check how many strings are in a sentence javascript
function WordCounter (str) {
var words = str.split(" ").length;
return words;
}
// this should work!
Example 2: length in typescript
var uname = "Hello world"
console.log("Length :"+uname.length) // returns the total number of characters
// including whitespace