The Manual Echo
Easy+15 XP
Mission Briefing
The Oracle's echo chamber is malfunctioning. To simulate an echo, you must manually repeat a sound wave multiple times.
The Concept: String Building in Loops
You can start with an empty string "" and continuously concatenate (+=) characters to it inside a loop to build long sequences dynamically.
The Objective
Your function receives a string char and a number times.
- Use a
forloop to construct a new string that repeatscharexactlytimestimes. - Do not use the built-in
.repeat()method! Return the manually built string.
Constraints
FundamentalsLoopsStrings
JavaScriptSystem handles I/O — write your function only
Loading...
3 Hidden
Input Arguments
char"A"
times3
Expected Output
AAA
Click RUN to test your solution