js功能实现

  1. 左边补零
// 不足5位左边补零
(Array(5).join('0') + 100).slice(-5)

你可能感兴趣的:(nodejs,javascript)