Problem

Return the total number of non-space characters in space-separated words.

Examples

  • totalCharsNoSpaces("hi there") -> 7
  • totalCharsNoSpaces("a") -> 1
Compile and test (Ctrl+Enter)