use new Array(n).join('s') idiom to repeat a string instead of a for loop