javascript, by net
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    const res = [];\n    const ln = s.length;\n    const hm = Math.floor(ln / k);\n    const rem = ln % k;\n\n    for (let i = 0; i < hm; i++) {\n        res.push(s.slice(i * k, (i + 1) * k));\n    }\n\n    if (rem !== 0) {\n        const ans = s.slice(hm * k, ln) + fill.repeat(k - rem);\n        res.push(ans);\n    }\n\n    return res;\n};\n\n```
['JavaScript']