10 XP challenge

Put a Separator Between Characters

easy
Build it yourself · 6 min
1 Learn2 Predict3 Solve

Task
Your mission

Return message with separator inserted between every neighboring pair of characters. Add no separator at either end. message has 0 to 20 ASCII characters; separator is exactly one ASCII character.

Examples

InputReturn
message = "abc", separator = "-"

answer: "" → "a" → "a-" → "a-b" → "a-b-" → "a-b-c". The result is "a-b-c".

"a-b-c"
message = "", separator = "-"""

Your code

Write your answer inside Solution, then use return to send it back.

Try examples runs the public examples. Check my code checks your full answer and saves your completion.