js 数字前面自动补零
num传入的数字,m需要的字符长度
function PrefixInteger(num, m) { return (Array(m).join(0) + num).slice(-m); }
例如:传入8,需要的字符长度为3,调用方法后字符串结果为:008
num传入的数字,m需要的字符长度
function PrefixInteger(num, m) { return (Array(m).join(0) + num).slice(-m); }
例如:传入8,需要的字符长度为3,调用方法后字符串结果为:008
It's not who you are underneath, it's what you do that defines you
Brick walls are there for a reason :they let us prove how badly we want things