function countWords(str) {
let c=0;
for (x in str){
if(str[x]==" ")
c++;
}
return c+1;
}
function countWords(str) {
let c=0;
for (x in str){
if(str[x]==" ")
c++;
}
return c+1;
}
For further actions, you may consider blocking this person and/or reporting abuse
Michal Kowalkowski -
MAYANK TYAGI -
Tubeguruji -
Michael Andreuzza -
Top comments (1)
or you do
which is not only easier to read but also faster