26. Count Words
Lesson 27 of 31 in Coddy's 30 Days of Logic Building in Javascript course.
Challenge
EasyWrite a function that counts the number of words in a sentence.
- Input:
<strong>"Hello, how are you today?"</strong> - Expected Output:
<strong>5</strong>
Try it yourself
function countWords(sentence) {
// write your code below
}All lessons in 30 Days of Logic Building in Javascript
1Introduction
What is here for you?