<html>
<body>
<h1>JavaScript console.time() Method</h1>
<p>Press F12 on your keyboard to view the result in the console view.</p>
<script>
var i;
console.time("test1");
for (i = 0; i < 100000; i++) {
// some code
}
console.timeEnd("test1");
</script>
<p>Time the number of milliseconds it takes to perform a for-loop a hundred thousand times.</p>
<p>This example deomnstrates how to use the label parameter</p>
<p>Make sure you use the same label when calling the console.timeEnd() method.</p>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_console_time2 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:01:39 GMT -->
</html>