String.repeat
The Javascript function repeat returns the input string
repeated any number of times
Example usage:
alert( 'abc'.repeat(3));
SOURCE
String.prototype.repeat = function(count) { if(count==null) count = 1; retval = ''; for(var x = 1; x<= count; x++) { retval+= this; } return retval; }