FunctionRacerProblemsRace

Reverse Each Word

BeginnerStringsPython, JavaScript, TypeScript, Java, C++

Words in s are separated by single spaces. Return a string where the letters of each word are reversed, but the words stay in the same order and the spaces stay where they were.

Example 1

s "Let us code"
returns "teL su edoc"

Each word flips on its own: teL su edoc.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More Strings problems