Link to coding challenge. Training on Mumbling | Codewars
The logic is this — every time you loop, it will repeat the string.
I’ve done good so far at breaking down the problem. I am receiving this error when trying to test it (note: clicking “test” is broken and is a known issue with this Kata. Hit “submit” to see what I mean )
console.log(s);
const split = s.split("");
console.log(split);
let myString = "";
for (let i = 0; i < split.length; i++) {
let result = split[i].repeat(i + 1);
myString.push(result)
}
}
TypeError: myString.push is not a function
at accum (test.js:11:14)
at Context.<anonymous> (test.js:20:20)
at processImmediate (internal/timers.js:464:21)