oletemCode
1/3/2018 - 3:03 PM

Repeat a string

function repeatStringNumTimes(str, num) {
  return num > 0 ? str.repeat(num) : '';
}

repeatStringNumTimes("abc", 3);