Javascript

Pad a number with leading zeroes in Javascript

As far as I know there isn’t a in-built way with Javascript to pad a number with leading zeroes to make it a fixed width like str_pad in PHP programming language. This post looks at a way to pad a number with zeroes with Javascript.