main.js
1
2
3
4
5
6
function repeatStringNumTimes(str, num) {
  // repeat after me
  return str.repeat(num);
}

repeatStringNumTimes("abc", 3);
Native Browser JavaScript