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
var stringRepeat = function(string, val) { var newString = []; for(var i = 0; i < val; i++) { newString.push(string); } return newString.join(''); } var repeatedString = stringRepeat("a", 1);