What is the best or most concise method for returning a string repeated an arbitrary amount of times?
The following is my best shot so far:
function
Here's the JSLint safe version
String.prototype.repeat = function (num) { var a = []; a.length = num << 0 + 1; return a.join(this); };