English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
console.timeEnd()Stop before callingconsole.time()to start the timer.
UsagelabelThe parameter specifies the timer to be terminated.
console.timeEnd(label)
console.time(); for (let i = 0; i < 1000; i++) { // pass } console.timeEnd();Test and see‹/›
All browsers fully support the console.timeEnd() method:
Method | |||||
console.timeEnd() | Yes | Yes | Yes | Yes | Yes |
Parameter | Description |
---|---|
label | (Optional) The name of the timer to stop. Once stopped, the elapsed time will be automatically displayed in the console. |
UsagelabelParameter:
console.time("myLabel"); for (let i = 0; i < 1000; i++) { // pass } console.timeEnd("myLabel");Test and see‹/›