repeat_n(xx)[30] in javascript code example Example: JavaScript repeat character var a="a"; var aaa=a.repeat(3); // "aaa"