X240: doubleChar

Given a string, return a string where for every char in the original, there are two chars.

Examples:

doubleChar("The") -> "TThhee"
doubleChar("AAbb") -> "AAAAbbbb"
doubleChar("Hi-There") -> "HHii--TThheerree"

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.