Wednesday, June 8, 2016

Measure performance of a given JavaScript code

console.time("for loop");
for(var i=0; i < 100; i++){
  console.log("i is: " + i);
}
console.timeEnd("for loop");

No comments:

Post a Comment