js number padding code example
Example 1: js num to string with leading 0
String(<number>).padStart(<places>, '0')
String(42).padStart(5, '0'); // '00042'
Example 2: lpad javascript
str.padStart(targetLength [, padString])
String(<number>).padStart(<places>, '0')
String(42).padStart(5, '0'); // '00042'
str.padStart(targetLength [, padString])