JS Console API

JS Console API

·

1 min read

Table of contents

No heading

No headings in the article.

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