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
/** @desc: repeat string @param: n - times @param: d - delimiter */ String.prototype.repeat = function (n, d) { return --n ? this + (d || '') + this.repeat(n, d) : '' + this };
this is how to repeat string several times using delimeter.