function repeatStringNumTimes(str, num) {
empty = "boo";//boo to test function with neg int
if(num < 0){
console.log(empty);
}else{
string = str.repeat(num);
console.log(string);
}
}`
The above code works for the algorithm when tested with every case in the chrome console yes fails in the FCC console.
coments? I have used console.log instead of return statements and boo instead of an empty string for the sake of this post!