Skip to content

Instantly share code, notes, and snippets.

@adamrobbie
Created June 23, 2012 03:17
Show Gist options
  • Save adamrobbie/2976606 to your computer and use it in GitHub Desktop.
Save adamrobbie/2976606 to your computer and use it in GitHub Desktop.
function PrefixInteger(num, length) {
return (Array(length).join('0') + num).slice(-length);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment