Created
January 4, 2017 09:47
-
-
Save lichenbuliren/3bf641bf8e41d45e4d1039b4fa121b66 to your computer and use it in GitHub Desktop.
一些 js 小技巧
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
// 保留两位数字符 | |
const twoDigits = (num) => ('0' + num).slice(-2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment