Easy | JavaScript | JS
\nvar divideString = function(s, k, fill) {\n    const res = [];\n    let str = \'\';\n    \n    for (let i = 0; i < s.length; i++) {\n        str += s[i];\n   
```\nvar divideString = function(s, k, fill) {\n    const res = [];\n    let str = \'\';\n    \n    for (let i = 0; i < s.length; i++) {\n        str += s[i];\n        \n        if (str.length === k) {\n            res.push(str);\n            str = \'\';\n        }\n    }\n    \n    const n = str.length;\n    \n    if (n > 0) {\n        for (let i = 0; i < k - n; i++) {\n            str += fill;\n        }    \n        res.push(str);\n    }\n    \n    return res;\n};\n```
['JavaScript']