how to words from a string in javascript 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!