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
Recursive solution using divide and conquer:
function repeat(n, s) { if (n==0) return ''; if (n==1 || isNaN(n)) return s; with(Math) { return repeat(floor(n/2), s)+repeat(ceil(n/2), s); } }