Skip to main content

Command Palette

Search for a command to run...

JS Console API

Updated
1 min read
JS Console API

Twitter Youtube Reference

  1. console.log() - For general information logging
  1. console.assert() - if the first argument is false then information logged in console.

  2. console.error() - logs error message

  3. console.trace() - outputs whole stack trace

6.png

console.time - console has several time APIs.

  1. console.time() - console.time('timer_1') - timer_1 is started

  2. console.timeEnd() - Stops the specified timer and logs the elapsed time in ms.

  3. console.timeLog() - Logs the value of the specified timer.

7.jpeg