Pad a number with leading zeroes in Javascript
As far as I have been able to tell there isn’t a built-in way with Javascript to pad a number with leading zeroes to make it a fixed width like with e.g. sprintf in other programming langages. This post looks at a way to pad a number with zeroes with Javascript.
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed