The Echo Chamber

Easy+15 XP

Mission Briefing

You are trapped inside the Grand Canyon! The acoustic properties here reflect sound exactly three times. You must program the Echo Chamber simulator to replicate this phenomenon.

The Concept: String Patterns

The .repeat(count) method constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together. Example: "Yo".repeat(2); // Returns "YoYo"

The Objective

Your function receives a string sound.

  1. Use the .repeat() method to duplicate the sound exactly 3 times.
  2. Return the repeated string without adding any spaces!

01EXAMPLE 1

Inputsound = "Ha"
Output"HaHaHa"

Constraints

  • Return the repeated string.
CoreStrings
JavaScript
Loading...
3 Hidden

Input Arguments

sound"Help"

Expected Output

HelpHelpHelp

Click RUN to test your solution