Tell us what’s happening:
Hello all, I have created the function, the results are right but can’t pass the test, even if the results are rigth. What I am doing wrong? Thanks in advance.
**Your code so far**
function repeatStringNumTimes(str, num) {
result = "";
for(let i = 0; i<num ; i++) result += str;
return result;
}
repeatStringNumTimes("abc", 3);
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36
Challenge: Repeat a String Repeat a String
Link to the challenge: