SyntaxFix
Write A Post
Hire A Developer
Questions
Try this:
var extension = fileString.substring(fileString.lastIndexOf('.') + 1);