Pad a number with leading zerosSen Hongo|Published on 2022/08/04|jsUsing String.prototype.padStart() const n = 1; String(n).padStart(5, '0'); // '00001'