Skip to content

Instantly share code, notes, and snippets.

@daresam
Last active May 8, 2020 17:55
Show Gist options
  • Save daresam/ca82b808f3f2de52ca6807e30452dfc5 to your computer and use it in GitHub Desktop.
Save daresam/ca82b808f3f2de52ca6807e30452dfc5 to your computer and use it in GitHub Desktop.

Revisions

  1. daresam renamed this gist May 8, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. daresam created this gist May 8, 2020.
    1 change: 1 addition & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    let padToThree = (number) => (number <= 999 ? `00${number}`.slice(-3) : number); // padToThree(11) return 011