Basic
Repeat a String Repeat a String
function repeatStrNumTimes(str,num){
let arr = []
while(num > 0){
arr.push(str)
num–}
return arr.join(’’)
}
Basic
function repeatStrNumTimes(str,num){
let arr = []
while(num > 0){
arr.push(str)
num–}
return arr.join(’’)
}
function repeatStrNumTimes(str,num){
let arr = []
while(num > 0){
arr.push(str)
num– // this line is your problem
}
return arr.join(’’)
}