function strRepeat(str, n, sep) {
  if(!n) {
    return str;
  }
  return str + sep + strRepeat(str, --n, sep);
}
Repeats a string n times with given separator
@param str string to repeat
@param n number of times
@param sep separator
@returns {*}