5 XP challenge

Repeat a Fragment

very easy
Build it yourself · 3 min
1 Learn2 Predict3 Solve

Task
Your mission

Repeat fragment as often as the times input specifies, with no separators, and return the result. fragment has 0 to 5 ASCII letters; times is 0 to 8.

Examples

InputReturn
fragment = "ab", times = 3

answer: "" → "ab" → "abab" → "ababab". The result is "ababab".

"ababab"
fragment = "x", times = 0""

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.