simple benchmarking js

#311
Raw
Author
Anonymous
Created
Dec. 29, 2020, 12:19 a.m.
Expires
Never
Size
178 bytes
Hits
53
Syntax
JavaScript
console.time('testing n² loop');
for(var i=0; i<1000; i++) {
  for (var j=0; j<1000; j++) {
>    // do something
  }
}
console.timeEnd('testing n² loop');