Repeats a string n times and returns the concatenated result.
n
string to repeat
number of times to repeat the string
repeated string
var str = repeat( 'a', 5 ); // returns 'aaaaa'
var str = repeat( '', 100 ); // returns ''
var str = repeat( 'beep', 0 ); // returns ''
Repeats a string
n
times and returns the concatenated result.