Repeats a string a specified number of times.
The string to repeat.
Number of times to repeat the string. Must be a non-negative integer.
The concatenated string repeated times times.
times
1.1.0
repeat("abc", 3); // "abcabcabc"repeat("!", 5); // "!!!!!"repeat("hi", 0); // "" Copy
repeat("abc", 3); // "abcabcabc"repeat("!", 5); // "!!!!!"repeat("hi", 0); // ""
Repeats a string a specified number of times.