Let me show in the following example.
console.time('for loop');
for (i = 0; i < 1000000; i++) {
// do nothing.
}
console.timeEnd('for loop');
To see the console, open Firebug in Firefox, then go to Console tab. If you don't have an HTML page where to put the Javascript code, you can go to http://jsfiddle.net and paste it there.
0 comments:
Post a Comment