Appearance
padZero(num, targetLength): string
num
targetLength
string
根据目标长度对数值前置补 0
number
undefined
2
padZero(1) // '01' padZero(10) // '10' padZero(10, 5) // '00100'