//實現函數
function fn3(num, length) { return (Array(length).join('0') + num).slice(-length); }
調用:
console.time('3'); fn3(); console.timeEnd('time3'); //chrome返回值:time3: 0ms
轉載:http://wsj123.iteye.com/blog/2412696
//實現函數
function fn3(num, length) { return (Array(length).join('0') + num).slice(-length); }
調用:
console.time('3'); fn3(); console.timeEnd('time3'); //chrome返回值:time3: 0ms
轉載:http://wsj123.iteye.com/blog/2412696
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。