1console.time("answer time");
2alert("Click to continue");
3console.timeLog("answer time");
4alert("Do a bunch of other stuff...");
5console.timeEnd("answer time");
6
1console.time();
2for (i = 0; i < 100000; i++) {
3 // some code
4}
5console.timeEnd();