Code passes tests but not challenge, repeat a string

Tell us what’s happening:
My code passes all tests but will not pass the challenge.

Your code so far

  var newstr = str.split('');
  if (num > 0) {
    for (i = 1; i < num; i++) {
      newstr.push(str);
    }
    return newstr.join('');
  } else {
    return "";
  }
}

repeat("*", 2);

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0.

Link to the challenge:

You, sir, are a genius. lol I actually completed some of these quite a awhile ago and apparently I changed function name to easier to type repeat. haha. Thanks