SyntaxFix
Write A Post
Hire A Developer
Questions
I use code below:
var fileSplit = filename.split('.'); var fileExt = ''; if (fileSplit.length > 1) { fileExt = fileSplit[fileSplit.length - 1]; } return fileExt;