代码: console.time('test') var sum = 0 for (i = 0; i < 100000; i++) { sum += i } console.log(sum) console.timeEnd('test')
输出: 4999950000 test: 15.122ms [Finished in 0.1s]
powered by kaifamiao