odin-default-js-exercises/02_repeatString/repeatString.js

13 lines
264 B
JavaScript

const repeatString = function repeatString (string, num) {
let repeatedString = ''
for (let num = 0; num <=2; num ++) {
repeatedString += string;
}
return repeatedString;
}
// Do not edit below this line
module.exports = repeatString;