Feedback for repeat a string repeat a string "solved"

  function repeatStringNumTimes(str, num) {
  empty = "boo";//boo to test function with neg int
  if(num < 0){
    string = str.repeat(num);

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!

Ok so I feel like a moron this does in fact pass all test in the fcc console…How can I delete this topic?

Thanks @P1xt greatly appreciated!