길이 : n, 수박수박수박수...와 같은 패턴으로 문자열을 리턴하는 함수 solution을 완성하라
n은 길이 10,000이하인 자연수.
입출력 예
n return
3 "수박수"
4 "수박수박"
The repeat() method constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together.
- a를 시작점으로 b인덱스 전까지의 값을 출력함
- const str = " hyunsoo";
- console.log(str.substring(2, 5);
⇒ uns (인덱스 2부터 4까지의 값 출력)