Skip to content

Instantly share code, notes, and snippets.

@nisshiee
Created July 17, 2012 14:47
Show Gist options
  • Save nisshiee/3129836 to your computer and use it in GitHub Desktop.
Save nisshiee/3129836 to your computer and use it in GitHub Desktop.
String.substr関数の挙動
// Chrome、FF、IE9
"4321".substr(-2); // → "21"
// Windowsガジェット
"4321".substr(-2); // → "4321"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment