single for-loop solution , 45ms runtime ,42mb-memory
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n/**\n * @param {string} s\n * @param {number} k\n * @param {character} fill\n * @return {string[]}\n */\nvar divideString = function(s, k, fill) {\n    let arr=[]\n    for(let i=0;i<s.length;i++){\n        if(i+k<=s.length){\n            arr.push(s.slice(i,i+k))\n            i=i+k-1\n        }\n        else{\n            let n=[]\n            let temp=new Array(k-(s.length-i))\n            n=[...s.slice(i,s.length),temp.fill(fill).join(\'\')]\n            let m=n.join(\'\')\n            arr.push(m)\n            i=s.length\n        }\n    }\n    return arr\n};\n```
['JavaScript']