Practice · 1 of 5
First half
CHALLENGE
Difficulty: beginner+25 XP
Implement String firstHalf(String s): the first half of the string, rounding down for odd lengths. One substring call.
Press Submit to check your solution.
Back to lesson: Practice: String surgery