JS simple sort arrow function
\nvar reorderLogFiles = function(logs) {\n    const letters = []\n    const digits = []\n    \n    for (let log of logs){\n\n        if (isNaN(log[log.length - 
```\nvar reorderLogFiles = function(logs) {\n    const letters = []\n    const digits = []\n    \n    for (let log of logs){\n\n        if (isNaN(log[log.length - 1])){\n            // it is letter\n            letters.push(log)\n        }\n        else digits.push(log)\n    }\n\n    letters.sort((a,b)=> {\n            stra = a.substr(a.indexOf(\' \') + 1)\n            strb = b.substr(b.indexOf(" ") + 1)\n            \n            if (stra == strb) return a.localeCompare(b) \n            else return stra.localeCompare(strb)            \n    })\n\n        \n    return letters.concat(digits)\n};\n```
['JavaScript']