diff --git a/repeatString/repeatString.js b/repeatString/repeatString.js index 28befb1..1d462e2 100644 --- a/repeatString/repeatString.js +++ b/repeatString/repeatString.js @@ -1,7 +1,8 @@ const repeatString = function(word, times) { - let arr = word.split(' '); + let arr = []; - for (let i = 1; i < times; i++) { + + for (let i = 0; i < times; i++) { arr.push(word); }