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
this is how you can call a function and get the result by the helps of Array() and join()
function repeatStringNumTimes(str, num) { // repeat after me return num > 0 ? Array(num+1).join(str) : ""; } console.log(repeatStringNumTimes("a",10))