Created
August 7, 2012 14:30
-
-
Save lean8086/3285840 to your computer and use it in GitHub Desktop.
Get the file extension of a string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getFileExtension(string) { | |
"use strict"; | |
return string.split(".").pop(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment