Last active
November 14, 2022 06:56
-
-
Save kobaatsu/ac5f19e5331de68911f38c305dd109a8 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
// ゼロ以外でも使える #noie | |
// https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/String/padStart | |
const z = (i + "").padStart(2, "0"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment