Problem

Return substring before first space or whole s.

Examples

  • firstWord("hi there") -> "hi"
Compile and test (Ctrl+Enter)