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
Fiddle: http://jsfiddle.net/3Y9v2/
function repeat(s, n){ return ((new Array(n+1)).join(s)); } alert(repeat('R', 10));