Skip to content

Instantly share code, notes, and snippets.

@mir4a
Last active December 15, 2015 05:49
Show Gist options
  • Save mir4a/5211489 to your computer and use it in GitHub Desktop.
Save mir4a/5211489 to your computer and use it in GitHub Desktop.
Add zero to numbers less than 10
function zero(number) {
return (number < 10 ? '0' : '') + number;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment