Write a function called repeat, which accepts a string and a number and returns a new string with the string repeated that number of times. code example
Example: how to return a string x amount in javascript without using . repeat
function repeatStringNumTimes(string, times) {
var repeatedString = "";
while (times > 0) {
repeatedString += string;
times--;
}
return repeatedString;
}
repeatStringNumTimes("abc", 3);