Skip to content

Instantly share code, notes, and snippets.

@seantunwin
Created November 5, 2019 16:43
Show Gist options
  • Save seantunwin/f8ac13ee41523fe413f45aa837faa224 to your computer and use it in GitHub Desktop.
Save seantunwin/f8ac13ee41523fe413f45aa837faa224 to your computer and use it in GitHub Desktop.
JavaScript: Get string after last slash
str.substring(str.lastIndexOf('/') + 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment