Skip to content

Instantly share code, notes, and snippets.

@shigemk2
Created February 23, 2013 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shigemk2/5020530 to your computer and use it in GitHub Desktop.
Save shigemk2/5020530 to your computer and use it in GitHub Desktop.
slice
console.log('ABCDEFGHIJKLMNOP'.slice(-5)); // LMNOP
console.log('ABCDEFGHIJKLMNOP'.slice(-10)); // GHIJKLMNOP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment