
๋ฌธ์์ด my_string๊ณผ ์ ์ n์ด ๋งค๊ฐ๋ณ์๋ก ์ฃผ์ด์ง ๋, my_string์ ๋ค์ด์๋ ๊ฐ ๋ฌธ์๋ฅผ n๋งํผ ๋ฐ๋ณตํ ๋ฌธ์์ด์ return ํ๋๋ก solution ํจ์๋ฅผ ์์ฑํด๋ณด์ธ์.
my_string ๊ธธ์ด โค 50n โค 50| my_string | n | result | 
|---|---|---|
| "hello" | 3 | "hhheeellllllooo" | 
์ ์ถ๋ ฅ ์ #1
const solution = (my_string, n) => [...my_string].map(a => a.repeat(n)).join("")