Created
July 11, 2018 10:09
-
-
Save rockonyu/a21394e37f9439262dcd5619da063725 to your computer and use it in GitHub Desktop.
This file contains 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
// 數字 X 左邊補零至 N 位數 | |
// ex. X = 23, N = 4 | |
("0000" + 23).slice(-4) // "0023" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment