English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML DOM console.timeEnd() Method

 JavaScript Console Object

console.timeEnd()Stop before callingconsole.time()to start the timer.

UsagelabelThe parameter specifies the timer to be terminated.

Syntax:

console.timeEnd(label)
console.time();
for (let i = 0; i < 1000; i++) {
// pass
}
console.timeEnd();
Test and see‹/›

Browser Compatibility

All browsers fully support the console.timeEnd() method:

Method
console.timeEnd()YesYesYesYesYes

Parameter Value

ParameterDescription
label(Optional) The name of the timer to stop. Once stopped, the elapsed time will be automatically displayed in the console.

More Examples

UsagelabelParameter:

console.time("myLabel");
for (let i = 0; i < 1000; i++) {
// pass
}
console.timeEnd("myLabel");
Test and see‹/›

 JavaScript Console Object