js how to get the lengh of a string code example
Example: how to check how many strings are in a sentence javascript
function WordCounter (str) {
var words = str.split(" ").length;
return words;
}
// this should work!
function WordCounter (str) {
var words = str.split(" ").length;
return words;
}
// this should work!