function solution(my_str, n) {
let str = my_str.split('');
let result = [];
while (str.length > 0) {
result.push(str.splice(0, n).join(''))
}
return result;
}
function solution(my_str, n) {
let res = [];
for (let i = 0; i < my_str.length; i+=n) res.push(my_str.slice(i, i+n));
return res;
}