Created
March 26, 2015 15:15
-
-
Save naosim/fc1877495149a0e2366a to your computer and use it in GitHub Desktop.
ゼロ埋め
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var zerofill = function(num, zeros) { return (Array(zeros).join('0') + num).slice(-zeros); }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment