Repeats the given string n times.
n
Optional
The string to repeat.
The number of times to repeat the string.
Returns the repeated string.
3.0.0
repeat('*', 3)// => '***'repeat('abc', 2)// => 'abcabc'repeat('abc', 0)// => '' Copy
repeat('*', 3)// => '***'repeat('abc', 2)// => 'abcabc'repeat('abc', 0)// => ''
Repeats the given string
n
times.