about | help | code help+videos | done | prefs |
For this method, you are given a sentence as a parameter. Count the number of words in the sentence. You may assume that each word is separated by only one space and each string has at least one word. countWords("Wow!") → 1 countWords("She is awesome.") → 3 countWords("This class is excellent.") → 4 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 200
Copyright Nick Parlante 2017 - privacy