Good Afternoon All
First post here, and very much a code novice.
Really having to do a lot of reading on these Basic Algorithm tasks.
Getting beat a lot, but determined to keep returning.
On this one, using the console.log it implies the results should pass (at least) some of the tests. But the ticks don’t appear.
Am I off track somewhere?
**Your code so far**
function repeatStringNumTimes(str, num) {
var result = " ";
while (num > 0) {
result += str
num = num-1
}
console.log(result)
return result;
}
repeatStringNumTimes("abc", 2);
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0
Challenge: Repeat a String Repeat a String
Link to the challenge: