📜  javascript代码示例中的计时代码

📅  最后修改于: 2022-03-11 15:02:17.200000             🧑  作者: Mango

代码示例1
var output = "";

// Start timing now
console.time("concatenation");

for (var i = 1; i <= 1e6; i++) {
  output += i;
}

// ... and stop.
console.timeEnd("concatenation");