Tell us what’s happening:
I don’t understand why the string doesn’t get printed out. Isn’t console.log used for printing?
Your code so far
function repeatStringNumTimes(str, num) {
// repeat after me
while(num>=0){
console.log(str);
num--;
}
if(num<0){
console.log("");
}
}
repeatStringNumTimes("abc", 3);
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36
.
Link to the challenge: