Skip to content

Instantly share code, notes, and snippets.

@kayz1
Created September 24, 2013 19:56
Show Gist options
  • Save kayz1/6690360 to your computer and use it in GitHub Desktop.
Save kayz1/6690360 to your computer and use it in GitHub Desktop.
var n = 123
String("00000" + n).slice(-5); // returns 00123
("00000" + n).slice(-5); // returns 00123
(" " + n).slice(-5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment