about | help | code help+videos | done | prefs |
Given a string that contains at least one space, return the second "word" in the string. If there is only one space, return all the characters that follow the space; otherwise return the characters between the first and second space. If the first two spaces are next to each other, an empty string is returned. secondWord("a red ball") → "red" secondWord("brown cow") → "cow" secondWord("a b c d e") → "b" ...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: 120
Copyright Nick Parlante 2017 - privacy