4 ms·
I have to admit to cheating and putting 'if (i === '.htaccess') return 'htaccess';' to save time :)
by taternuts 13y ago
I have to admit to cheating and putting 'if (i === '.htaccess') return 'htaccess';' to save time :)
- jrawlings 13y agoI just did return i.indexOf('.') > -1 ? i.substring(i.indexOf('.')+1) : false; Seemed to pass all test cases
- EdgarVerona 13y agoAye, I did similarly, though for some reason I did >= 0 instead of > -1. I wonder what % of people choose one test approach vs. the other?
- taternuts 13y agoI chose >= 0, it's fun to learn!