Repeats the given string n times.
If n is less than 1, an empty string is returned, or if the string is an empty string, the original string is returned unchanged.
The string to repeat.
The number of times to repeat the string.
repeat('abc', 0); // ''repeat('abc', 2); // 'abcabc' Copy
repeat('abc', 0); // ''repeat('abc', 2); // 'abcabc'
Alias