str.repeat(count) repeat() 메서드는 문자열을 주어진 횟수만큼 반복해 붙인 새로운 문자열을 반환합니다.
str.repeat(count)
count : 문자열을 반복할 횟수. 0과 양의 무한대 사이의 정수(0, +∞).
count
"abc".repeat(-1); // RangeError "abc".repeat(0); // '' "abc".repeat(1); // 'abc' "abc".repeat(2); // 'abcabc'