In Perl I can repeat a character multiple times using the syntax:
$a = \"a\" x 10; // results in \"aaaaaaaaaa\"
Is there a simple way to ac
In a new ES6 harmony, you will have native way for doing this with repeat. Also ES6 right now only experimental, this feature is already available in Edge, FF, Chrome and Safari
"abc".repeat(3) // "abcabcabc"
And surely if repeat function is not available you can use old-good Array(n + 1).join("abc")